Skip to content

Commit

Permalink
Merge main into insiders branch (#8656)
Browse files Browse the repository at this point in the history
  • Loading branch information
Colengms authored Jan 12, 2022
1 parent 7f99606 commit d0985f5
Show file tree
Hide file tree
Showing 41 changed files with 720 additions and 3,174 deletions.
18 changes: 5 additions & 13 deletions .github/workflows/ci_linux.yml
Original file line number Diff line number Diff line change
Expand Up @@ -22,18 +22,10 @@ jobs:
run: yarn install
working-directory: Extension

- name: Generate hashes for runtime dependency packages
run: yarn run generatePackageHashes
working-directory: Extension

- name: Compile Sources
run: yarn run compile
working-directory: Extension

- name: Validate Extension/package.json
run: yarn run pr-check
working-directory: Extension

- name: Run Linter
run: yarn run lint
working-directory: Extension
Expand All @@ -48,8 +40,8 @@ jobs:
run: yarn run unitTests
working-directory: Extension

- name: Run languageServer integration tests
uses: GabrielBB/[email protected]
with:
run: yarn run integrationTests
working-directory: Extension
# - name: Run languageServer integration tests
# uses: GabrielBB/[email protected]
# with:
# run: yarn run integrationTests
# working-directory: Extension
18 changes: 5 additions & 13 deletions .github/workflows/ci_mac.yml
Original file line number Diff line number Diff line change
Expand Up @@ -22,18 +22,10 @@ jobs:
run: yarn install --network-timeout 100000
working-directory: Extension

- name: Generate hashes for runtime dependency packages
run: yarn run generatePackageHashes
working-directory: Extension

- name: Compile Sources
run: yarn run compile
working-directory: Extension

- name: Validate Extension/package.json
run: yarn run pr-check
working-directory: Extension

- name: Run Linter
run: yarn run lint
working-directory: Extension
Expand All @@ -48,8 +40,8 @@ jobs:
run: yarn run unitTests
working-directory: Extension

- name: Run languageServer integration tests
uses: GabrielBB/[email protected]
with:
run: yarn run integrationTests
working-directory: Extension
# - name: Run languageServer integration tests
# uses: GabrielBB/[email protected]
# with:
# run: yarn run integrationTests
# working-directory: Extension
14 changes: 3 additions & 11 deletions .github/workflows/ci_windows.yml
Original file line number Diff line number Diff line change
Expand Up @@ -22,18 +22,10 @@ jobs:
run: yarn install
working-directory: Extension

- name: Generate hashes for runtime dependency packages
run: yarn run generatePackageHashes
working-directory: Extension

- name: Compile Sources
run: yarn run compile
working-directory: Extension

- name: Validate Extension/package.json
run: yarn run pr-check
working-directory: Extension

- name: Run Linter
run: yarn run lint
working-directory: Extension
Expand All @@ -46,6 +38,6 @@ jobs:
run: yarn run unitTests
working-directory: Extension

- name: Run languageServer integration tests
run: yarn run integrationTests
working-directory: Extension
# - name: Run languageServer integration tests
# run: yarn run integrationTests
# working-directory: Extension
1 change: 1 addition & 0 deletions Extension/.vscodeignore
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@ ui/*.ts

# ignore Azure-Pipelines files
jobs/**
cgmanifest.json

# ignore development files
tsconfig.json
Expand Down
24 changes: 24 additions & 0 deletions Extension/cgmanifest.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
{
"Registrations": [
{
"Component": {
"Type": "git",
"Git": {
"RepositoryUrl": "https://github.com/llvm/llvm-project",
"CommitHash": "0d44201451f03ba907cdb268ddddfc3fa38a0ebd"
},
"DevelopmentDependency": true
}
},
{
"Component": {
"Type": "git",
"Git": {
"RepositoryUrl": "https://github.com/lldb-tools/lldb-mi",
"CommitHash": "2388bd74133bc21eac59b2e2bf97f2a30770a315"
}
}
}
],
"Version": 1
}
117 changes: 2 additions & 115 deletions Extension/gulpfile.js
Original file line number Diff line number Diff line change
Expand Up @@ -71,17 +71,6 @@ gulp.task('lint', function () {
.pipe(eslint.failAfterError());
});

gulp.task('pr-check', (done) => {
const packageJson = JSON.parse(fs.readFileSync('./package.json').toString());
if (packageJson.activationEvents.length !== 1 && packageJson.activationEvents[0] !== '*') {
console.log('Please make sure to not check in package.json that has been rewritten by the extension activation. If you intended to have changes in package.json, please only check-in your changes. If you did not, please run `git checkout -- package.json`.');
done();
process.exit(1);
}

done();
});


// ****************************
// Command: translations-export
Expand Down Expand Up @@ -301,109 +290,6 @@ gulp.task("translations-import", (done) => {
}));
});

// ****************************
// Command: generate-package-hashes
// Generates a hash for each dependency package
// ****************************

async function DownloadFile(urlString) {
const buffers = [];
return new Promise((resolve, reject) => {
const req = https.request(urlString, (response) => {
if (response.statusCode === 301 || response.statusCode === 302) {
// Redirect - download from new location
let redirectUrl;
if (typeof response.headers.location === "string") {
redirectUrl = response.headers.location;
} else {
if (!response.headers.location) {
console.log(`Invalid download location received`);
return reject();
}
redirectUrl = response.headers.location[0];
}
console.log(`Using redirectUrl: '${redirectUrl}'`);
return resolve(DownloadFile(redirectUrl));
} else if (response.statusCode !== 200) {
if (response.statusCode === undefined || response.statusCode === null) {
console.log("unknown error code.");
return reject();
}
console.log(`failed with error code: '${response.statusCode}'`);
return reject();
}

response.on('data', (data) => {
buffers.push(data);
});

response.on('end', () => {
if (buffers.length > 0) {
return resolve(Buffer.concat(buffers));
} else {
return reject();
}
});

response.on('error', err => {
console.log(`problem with request: '${err.message}'`);
return reject();
});
});

req.on('error', err => {
console.log(`problem with request: '${err.message}'`);
return reject();
});

// Execute the request
req.end();
});

}

async function generatePackageHashes(packageJson) {
const downloadAndGetHash = async (url) => {
console.log(url);
try {
const buf = await DownloadFile(url);
if (buf) {
const hash = crypto.createHash('sha256');
hash.update(buf);
const value = hash.digest('hex').toUpperCase();
return value;
}
return undefined;
} catch (err) {
return undefined;
}
};

for (let dependency of packageJson.runtimeDependencies) {
console.log(`-------- Downloading package: '${dependency.description}' --------`);
const hash = await downloadAndGetHash(dependency.url);
if (hash) {
dependency.integrity = hash;
console.log(`integrity: '${hash}'`);
} else {
console.log(`No hash generated for package '${dependency.description}`);
}
console.log(`\n`);
}

let content = JSON.stringify(packageJson, null, 2);
return content;
}

gulp.task('generate-package-hashes', async (done) => {
const packageJsonPath = './package.json';
const packageJson = JSON.parse(fs.readFileSync(packageJsonPath).toString());
const content = await generatePackageHashes(packageJson);
fs.writeFileSync(packageJsonPath, content);
done();
});


// ****************************
// Command: translations-generate
// The following is used to import an i18n directory structure and generate files used at runtime.
Expand Down Expand Up @@ -679,7 +565,7 @@ ${typeScriptSwitchContent}
// ****** This file is generated from nativeStrings.json. Do not edit this file directly. ******
#pragma once
// NOLINTBEGIN(modernize-raw-string-literal)
enum class localized_string_id : unsigned int
{
blank = 0,
Expand All @@ -688,6 +574,7 @@ ${nativeEnumContent}};
inline static const char *localizable_strings[] = {
"",
${nativeStringTableContent}};
// NOLINTEND(modernize-raw-string-literal)
`;

console.log("Writing file: localized_string_ids.h -- If changed, copy to VS repo: src/vc/designtime/vscode/Common/generated/");
Expand Down
28 changes: 21 additions & 7 deletions Extension/i18n/chs/package.i18n.json
Original file line number Diff line number Diff line change
Expand Up @@ -34,12 +34,12 @@
"c_cpp.configuration.maxConcurrentThreads.markdownDescription": "用于语言服务处理的最大并发线程数。该值是一个提示,且不能始终使用。默认值 `null` (空)使用可用的逻辑处理器数。",
"c_cpp.configuration.maxCachedProcesses.markdownDescription": "用于语言服务处理的最大缓存进程数。默认值 `null` (空)使用可用逻辑处理器数的两倍。",
"c_cpp.configuration.maxMemory.markdownDescription": "可用于语言服务处理的最大内存(以 MB 为单位)。超过此内存使用量后,将缓存且并发运行较少的进程。默认值 `null` (空)使用系统的空闲内存。",
"c_cpp.configuration.intelliSense.maxCachedProcesses.markdownDescription": "要继续运行的最大 IntelliSense 进程数。默认值 `null` (空)使用从 `#C_Cpp.maxCachedProcesses#` 继承的值",
"c_cpp.configuration.intelliSense.maxCachedProcesses.markdownDescription": "要继续运行的最大 IntelliSense 进程数。默认值 `null` (空)使用从 `#C_Cpp.maxCachedProcesses#` 继承的值",
"c_cpp.configuration.intelliSense.maxMemory.markdownDescription": "超过此内存使用量(以 MB 为单位)后,在创建新进程之前,旧的 IntelliSense 进程将关闭。默认值 `null` (空)使用从 `#C_Cpp.maxMemory#` 继承的值。",
"c_cpp.configuration.references.maxConcurrentThreads.markdownDescription": "用于“查找所有引用”和“重命名”的最大并发线程数。默认值 `null` (空)使用从 `#C_Cpp.maxConcurrentThreads#` 继承的值。",
"c_cpp.configuration.references.maxCachedProcesses.markdownDescription": "要为“查找所有引用”和“重命名”保留在内存中的最大进程数。`null` (空)的值使用从 `#C_Cpp.maxCachedProcesses#` 继承的值",
"c_cpp.configuration.references.maxCachedProcesses.markdownDescription": "“查找所有引用”和“重命名”的要保留在内存中的最大进程数。默认值 `0` 将禁用此功能。值为 `null` (空)则使用从 `#C_Cpp.maxCachedProcesses#` 继承的值",
"c_cpp.configuration.references.maxMemory.markdownDescription": "超过此内存使用量(以 MB 为单位)后,将缓存且并发运行更少的“查找所有引用”和“重命名”进程。默认值 `null` (空)使用从 `#C_Cpp.maxMemory#` 继承的值。",
"c_cpp.configuration.codeAnalysis.maxConcurrentThreads.markdownDescription": "用于代码分析的最大并发线程数。默认值 \"null\" (空)使用从 \"#C_Cpp.maxConcurrentThreads#\" 继承的值的一半。",
"c_cpp.configuration.codeAnalysis.maxConcurrentThreads.markdownDescription": "用于代码分析的最大并发线程数。默认值 `null` (空)使用从 `#C_Cpp.maxConcurrentThreads#` 继承的值的一半。",
"c_cpp.configuration.codeAnalysis.maxMemory.markdownDescription": "超过此内存使用量(以 MB 为单位)后,将并发运行更少的代码分析进程。默认值 `null` (空)使用从 `#C_Cpp.maxMemory#` 继承的值。",
"c_cpp.configuration.codeAnalysis.updateDelay.markdownDescription": "控制在 `#files.autoSave#` 为 `afterDelay` 且 `#C_Cpp.codeAnalysis.runAutomatically#` 为 `true` 时从编辑触发保存后,代码分析开始处理之前的延迟(以毫秒为单位)。",
"c_cpp.configuration.codeAnalysis.exclude.markdownDescription": "配置 glob 模式已排除用于代码分析的文件夹和文件。始终排除不在工作区文件夹下的文件。从 `#files.exclude#` 和 `#C_Cpp.files.exclude#` 继承值。详细了解 glob 模式 [此处](https://code.visualstudio.com/docs/editor/codebasics#_advanced-search-options)。",
Expand All @@ -54,7 +54,7 @@
"c_cpp.configuration.codeAnalysis.clangTidy.args.markdownDescription": "要传递给 `clang-tidy` 的其他命令行参数。这些优先于等效的 `C_Cpp.codeAnalysis.clangTidy.*` 设置。",
"c_cpp.configuration.codeAnalysis.clangTidy.checks.enabled.markdownDescription": "已启用的 `clang-tidy` 检查列表。这些值将追加到 `.clang-tidy` 文件中的 `Checks` 或 `#C_Cpp.codeAnalysis.clangTidy.config#` (如果有)。除非显式禁用,否则始终使用默认检查 `clang-analyzer-*`。",
"c_cpp.configuration.codeAnalysis.clangTidy.checks.disabled.markdownDescription": "已禁用的 `clang-tidy` 检查列表。该值将追加到 `.clang-tidy` 文件中的 `Checks` 或 `#C_Cpp.codeAnalysis.clangTidy.config#` (如果有)。",
"c_cpp.configuration.formatting.description": "配置格式化引擎",
"c_cpp.configuration.formatting.description": "配置格式设置引擎。",
"c_cpp.configuration.formatting.clangFormat.markdownDescription": "`clang-format` 将用于格式代码。",
"c_cpp.configuration.formatting.vcFormat.markdownDescription": "将使用 Visual C++ 格式设置引擎来设置代码的格式。",
"c_cpp.configuration.formatting.Default.markdownDescription": "默认情况下,`clang-format` 将用于格式化代码。但是,如果找到具有相关设置的 `.editorconfig` 文件接近于所格式化的代码,且 `#C_Cpp.clang_format_style#` 为默认值: `file`,则将使用 Visual C++ 格式化引擎。",
Expand All @@ -64,7 +64,7 @@
"c_cpp.configuration.vcFormat.indent.multiLineRelativeTo.outermostParenthesis.description": "相对于最外侧的左括号缩进新行。",
"c_cpp.configuration.vcFormat.indent.multiLineRelativeTo.innermostParenthesis.description": "相对于最内侧的左括号缩进新行。",
"c_cpp.configuration.vcFormat.indent.multiLineRelativeTo.statementBegin.description": "相对于当前语句的开头缩进新行。",
"c_cpp.configuration.vcFormat.indent.withinParentheses.markdownDescription": "键入新行时,其会在左括号下或根据`#C_Cpp.vcFormat.indent.multiLineRelativeTo#` 进行对齐。",
"c_cpp.configuration.vcFormat.indent.withinParentheses.markdownDescription": "键入新行时,其会在左括号下或根据 `#C_Cpp.vcFormat.indent.multiLineRelativeTo#` 进行对齐。",
"c_cpp.configuration.vcFormat.indent.withinParentheses.alignToParenthesis.markdownDescription": "新行对齐到左括号下。",
"c_cpp.configuration.vcFormat.indent.withinParentheses.indent.markdownDescription": "根据 `#C_Cpp.vcFormat.indent.multiLineRelativeTo#` 缩进新行。",
"c_cpp.configuration.vcFormat.indent.preserveWithinParentheses.description": "在现有代码中,保留括号内新行现有的缩进对齐方式。",
Expand Down Expand Up @@ -152,7 +152,7 @@
"c_cpp.configuration.intelliSenseEngine.default.description": "通过单独的 IntelliSense 流程提供上下文感知结果。",
"c_cpp.configuration.intelliSenseEngine.tagParser.description": "提供非上下文感知的“模糊”结果。",
"c_cpp.configuration.intelliSenseEngine.disabled.description": "关闭 C/C++ 语言服务功能。",
"c_cpp.configuration.intelliSenseEngineFallback.markdownDescription": "控制 IntelliSense 引擎是否将自动切换为包含`#include` 错误的翻译单元的标记分析器。",
"c_cpp.configuration.intelliSenseEngineFallback.markdownDescription": "控制 IntelliSense 引擎是否将自动切换为包含 `#include` 错误的翻译单元的标记分析器。",
"c_cpp.configuration.autocomplete.markdownDescription": "控制自动完成提供程序。如果“已禁用”,且你想要基于字词的补全,则还需要设置 `\"[cpp]\": {\"editor.wordBasedSuggestions\": true}`(对 `c` 和 `cuda-cpp` 语言同样执行此操作)。",
"c_cpp.configuration.autocomplete.default.description": "使用活动的 IntelliSense 引擎。",
"c_cpp.configuration.autocomplete.disabled.description": "使用 Visual Studio Code 提供的基于字词的补全。",
Expand Down Expand Up @@ -305,5 +305,19 @@
"c_cpp.debuggers.VSSymbolOptionsModuleFilter.mode.loadOnlyIncluded.enumDescriptions": "请勿尝试为任何模块加载符号,除非该模块在 \"includedModules\" 数组中,或者它通过 \"includeSymbolsNextToModules\" 设置包含在内。",
"c_cpp.debuggers.VSSymbolOptionsModuleFilter.excludedModules.description": "调试程序不得为其加载符号的模块数组。支持通配符(例如: MyCompany.*.dll)。\n\n会忽略此属性,除非“模式”设置为 \"loadAllButExcluded\"",
"c_cpp.debuggers.VSSymbolOptionsModuleFilter.includedModules.description": "调试程序应为其加载符号的模块数组。支持通配符(例如: MyCompany.*.dll)。\n\n会忽略此属性,除非“模式”设置为 \"loadOnlyIncluded\"",
"c_cpp.debuggers.VSSymbolOptionsModuleFilter.includeSymbolsNextToModules.description": "如果为 true,则对于未在 \"includedModules\" 数组中的任何模块,调试程序将在模块本身和启动可执行文件旁边进行检查,但它将不检查符号搜索列表上的路径。此选项默认为 \"true\"\n\n会忽略此属性,除非“模式”设置为 \"loadOnlyIncluded\""
"c_cpp.debuggers.VSSymbolOptionsModuleFilter.includeSymbolsNextToModules.description": "如果为 true,则对于未在 \"includedModules\" 数组中的任何模块,调试程序将在模块本身和启动可执行文件旁边进行检查,但它将不检查符号搜索列表上的路径。此选项默认为 \"true\"\n\n会忽略此属性,除非“模式”设置为 \"loadOnlyIncluded\"",
"c_cpp.semanticTokenTypes.referenceType.description": "C++/CLI 引用类型的样式。",
"c_cpp.semanticTokenTypes.cliProperty.description": "C++/CLI 属性的样式。",
"c_cpp.semanticTokenTypes.genericType.description": "C++/CLI 泛型类型的样式。",
"c_cpp.semanticTokenTypes.valueType.description": "C++/CLI 值类型的样式。",
"c_cpp.semanticTokenTypes.templateFunction.description": "C++ 模板函数的样式。",
"c_cpp.semanticTokenTypes.templateType.description": "C++ 模板类型的样式。",
"c_cpp.semanticTokenTypes.operatorOverload.description": "C++ 重载运算符的样式。",
"c_cpp.semanticTokenTypes.memberOperatorOverload.description": "C++ 重载运算符成员函数的样式。",
"c_cpp.semanticTokenTypes.newOperator.description": "C++ 新运算符或删除运算符的样式。",
"c_cpp.semanticTokenTypes.customLiteral.description": "C++ 用户定义文本的样式。",
"c_cpp.semanticTokenTypes.numberLiteral.description": "C++ 用户定义文本数字的样式。",
"c_cpp.semanticTokenTypes.stringLiteral.description": "C++ 用户定义文本字符串的样式。",
"c_cpp.semanticTokenModifiers.global.description": "用于全局符号的样式。",
"c_cpp.semanticTokenModifiers.local.description": "用于本地符号的样式。"
}
Loading

0 comments on commit d0985f5

Please sign in to comment.