Skip to content

Commit 799ad6f

Browse files
Merge branch 'main' into open-qlref
2 parents d07b4ef + bdda277 commit 799ad6f

12 files changed

Lines changed: 1598 additions & 3427 deletions

File tree

.github/workflows/main.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -126,7 +126,7 @@ jobs:
126126
strategy:
127127
matrix:
128128
os: [ubuntu-latest, windows-latest]
129-
version: ['v2.2.6', 'v2.3.3', 'v2.4.5', 'v2.4.6']
129+
version: ['v2.2.6', 'v2.3.3', 'v2.4.5', 'v2.4.6', 'v2.5.0']
130130
env:
131131
CLI_VERSION: ${{ matrix.version }}
132132
TEST_CODEQL_PATH: '${{ github.workspace }}/codeql'

extensions/ql-vscode/CHANGELOG.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,8 @@
22

33
## [UNRELEASED]
44

5+
- Avoid showing an error popup when user runs a query with `@kind table` metadata. [#814](https://github.com/github/vscode-codeql/pull/814)
6+
57
## 1.4.5 - 22 March 2021
68

79
- Avoid showing an error popup when user runs a query without `@kind` metadata. [#801](https://github.com/github/vscode-codeql/pull/801)

extensions/ql-vscode/gulpfile.ts/deploy.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,7 @@ const packageFiles = [
1313
'CHANGELOG.md',
1414
'README.md',
1515
'language-configuration.json',
16+
'snippets.json',
1617
'media',
1718
'node_modules',
1819
'out'

extensions/ql-vscode/gulpfile.ts/webpack.config.ts

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,10 @@ export const config: webpack.Configuration = {
1313
},
1414
devtool: 'inline-source-map',
1515
resolve: {
16-
extensions: ['.js', '.ts', '.tsx', '.json']
16+
extensions: ['.js', '.ts', '.tsx', '.json'],
17+
fallback: {
18+
path: false
19+
}
1720
},
1821
module: {
1922
rules: [

extensions/ql-vscode/gulpfile.ts/webpack.ts

Lines changed: 17 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -6,21 +6,23 @@ export function compileView(cb: (err?: Error) => void) {
66
if (error) {
77
cb(error);
88
}
9-
console.log(stats.toString({
10-
errorDetails: true,
11-
colors: true,
12-
assets: false,
13-
builtAt: false,
14-
version: false,
15-
hash: false,
16-
entrypoints: false,
17-
timings: false,
18-
modules: false,
19-
errors: true
20-
}));
21-
if (stats.hasErrors()) {
22-
cb(new Error('Compilation errors detected.'));
23-
return;
9+
if (stats) {
10+
console.log(stats.toString({
11+
errorDetails: true,
12+
colors: true,
13+
assets: false,
14+
builtAt: false,
15+
version: false,
16+
hash: false,
17+
entrypoints: false,
18+
timings: false,
19+
modules: false,
20+
errors: true
21+
}));
22+
if (stats.hasErrors()) {
23+
cb(new Error('Compilation errors detected.'));
24+
return;
25+
}
2426
}
2527

2628
cb();

extensions/ql-vscode/package-lock.json

Lines changed: 1527 additions & 3397 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

extensions/ql-vscode/package.json

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -922,15 +922,15 @@
922922
"sinon-chai": "~3.5.0",
923923
"style-loader": "~0.23.1",
924924
"through2": "^3.0.1",
925-
"ts-loader": "^5.4.5",
925+
"ts-loader": "^8.1.0",
926926
"ts-node": "^8.3.0",
927927
"ts-protoc-gen": "^0.9.0",
928928
"typescript": "~3.8.3",
929929
"typescript-formatter": "^7.2.2",
930930
"vsce": "^1.65.0",
931931
"vscode-test": "^1.4.0",
932-
"webpack": "^4.38.0",
933-
"webpack-cli": "^3.3.2"
932+
"webpack": "^5.28.0",
933+
"webpack-cli": "^4.6.0"
934934
},
935935
"husky": {
936936
"hooks": {

extensions/ql-vscode/src/databases-ui.ts

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -423,9 +423,9 @@ export class DatabaseUI extends DisposableObject {
423423
if (failures.length) {
424424
const dirname = path.dirname(failures[0]);
425425
showAndLogErrorMessage(
426-
`Failed to delete unused databases:\n ${
427-
failures.join('\n ')
428-
}\n. To delete unused databases, please remove them manually from the storage folder ${dirname}.`
426+
`Failed to delete unused databases (${
427+
failures.join(', ')
428+
}).\nTo delete unused databases, please remove them manually from the storage folder ${dirname}.`
429429
);
430430
}
431431
};

extensions/ql-vscode/src/helpers.ts

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,8 +29,13 @@ export async function showAndLogErrorMessage(message: string, {
2929
items = [] as string[],
3030
fullMessage = undefined as (string | undefined)
3131
} = {}): Promise<string | undefined> {
32-
return internalShowAndLog(message, items, outputLogger, Window.showErrorMessage, fullMessage);
32+
return internalShowAndLog(dropLinesExceptInitial(message), items, outputLogger, Window.showErrorMessage, fullMessage);
3333
}
34+
35+
function dropLinesExceptInitial(message: string, n = 2) {
36+
return message.toString().split(/\r?\n/).slice(0, n).join('\n');
37+
}
38+
3439
/**
3540
* Show a warning message and log it to the console
3641
*

extensions/ql-vscode/src/interface.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -634,7 +634,7 @@ export class InterfaceManager extends DisposableObject {
634634
// If interpretation fails, accept the error and continue
635635
// trying to render uninterpreted results anyway.
636636
showAndLogErrorMessage(
637-
`Exception during results interpretation: ${e.message}. Will show raw results instead.`
637+
`Showing raw results instead of interpreted ones due to an error. ${e.message}`
638638
);
639639
}
640640
}

0 commit comments

Comments
 (0)