Fixes build folder compilation + enable linux .deb files (#23006) (#23042)

This commit is contained in:
Cheena Malhotra
2023-05-09 11:10:14 -07:00
committed by GitHub
parent bca671bc3f
commit 0bcd010d9a
57 changed files with 1212 additions and 2101 deletions

View File

@@ -113,7 +113,7 @@ const RULES = [
},
// Common: vs/platform/native/common/native.ts
{
target: '**/vs/platform/native/common/native.ts',
target: '**/{vs,sql}/platform/native/common/native.ts',
allowedTypes: CORE_TYPES,
disallowedTypes: [ /* Ignore native types that are defined from here */],
disallowedDefinitions: [
@@ -209,7 +209,6 @@ let hasErrors = false;
function checkFile(program, sourceFile, rule) {
checkNode(sourceFile);
function checkNode(node) {
var _a, _b;
if (node.kind !== ts.SyntaxKind.Identifier) {
return ts.forEachChild(node, checkNode); // recurse down
}
@@ -224,10 +223,10 @@ function checkFile(program, sourceFile, rule) {
}
const parentSymbol = _parentSymbol;
const text = parentSymbol.getName();
if ((_a = rule.allowedTypes) === null || _a === void 0 ? void 0 : _a.some(allowed => allowed === text)) {
if (rule.allowedTypes?.some(allowed => allowed === text)) {
return; // override
}
if ((_b = rule.disallowedTypes) === null || _b === void 0 ? void 0 : _b.some(disallowed => disallowed === text)) {
if (rule.disallowedTypes?.some(disallowed => disallowed === text)) {
const { line, character } = sourceFile.getLineAndCharacterOfPosition(node.getStart());
console.log(`[build/lib/layersChecker.ts]: Reference to type '${text}' violates layer '${rule.target}' (${sourceFile.fileName} (${line + 1},${character + 1})`);
hasErrors = true;