Skip to content

Commit 6114f6a

Browse files
committed
Merge branch 'main' into aeisenberg/analysis-results-on-restart
2 parents 006cc8c + 49cceff commit 6114f6a

17 files changed

Lines changed: 1427 additions & 406 deletions

.github/dependabot.yml

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
version: 2
2+
updates:
3+
- package-ecosystem: "npm"
4+
directory: "extensions/ql-vscode"
5+
schedule:
6+
interval: "daily"
7+
labels:
8+
- "Update dependencies"
9+
ignore:
10+
- dependency-name: "*"
11+
update-types: ["version-update:semver-minor", "version-update:semver-patch"]
12+
- package-ecosystem: "github-actions"
13+
directory: ".github"
14+
schedule:
15+
interval: "daily"
16+
labels:
17+
- "Update dependencies"
18+
ignore:
19+
- dependency-name: "*"
20+
update-types: ["version-update:semver-minor", "version-update:semver-patch"]

extensions/ql-vscode/CHANGELOG.md

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,8 @@
33
## [UNRELEASED]
44

55
- Fix a bug where the AST viewer was not synchronizing its selected node when the editor selection changes. [#1230](https://github.com/github/vscode-codeql/pull/1230)
6+
- Open the directory in the finder/explorer (instead of just highlighting it) when running the "Open query directory" command from the query history view. [#1235](https://github.com/github/vscode-codeql/pull/1235)
7+
- Ensure query label in the query history view changes are persisted across restarts. [#1235](https://github.com/github/vscode-codeql/pull/1235)
68

79
## 1.6.1 - 17 March 2022
810

@@ -15,6 +17,7 @@ No user facing changes.
1517
- Fix a bug where queries took a long time to run if there are no folders in the workspace. [#1157](https://github.com/github/vscode-codeql/pull/1157)
1618
- [BREAKING CHANGE] The `codeQL.runningQueries.customLogDirectory` setting is deprecated and no longer has any function. Instead, all query log files will be stored in the query history directory, next to the query results. [#1178](https://github.com/github/vscode-codeql/pull/1178)
1719
- Add a _Open query directory_ command for query items. This command opens the directory containing all artifacts for a query. [#1179](https://github.com/github/vscode-codeql/pull/1179)
20+
- Add options to display evaluator logs for a given query run. Some information that was previously found in the query server output may now be found here. [#1186](https://github.com/github/vscode-codeql/pull/1186)
1821

1922
## 1.5.11 - 10 February 2022
2023

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

Lines changed: 13 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
11
import * as gulp from 'gulp';
2-
import { compileTypeScript, watchTypeScript, copyViewCss, cleanOutput } from './typescript';
2+
import { compileTypeScript, watchTypeScript, copyViewCss, cleanOutput, watchCss } from './typescript';
33
import { compileTextMateGrammar } from './textmate';
44
import { copyTestData } from './tests';
5-
import { compileView } from './webpack';
5+
import { compileView, watchView } from './webpack';
66
import { packageExtension } from './package';
77
import { injectAppInsightsKey } from './appInsights';
88

@@ -14,5 +14,15 @@ export const buildWithoutPackage =
1414
)
1515
);
1616

17-
export { cleanOutput, compileTextMateGrammar, watchTypeScript, compileTypeScript, copyTestData, injectAppInsightsKey };
17+
export {
18+
cleanOutput,
19+
compileTextMateGrammar,
20+
watchTypeScript,
21+
watchView,
22+
compileTypeScript,
23+
copyTestData,
24+
injectAppInsightsKey,
25+
compileView,
26+
watchCss
27+
};
1828
export default gulp.series(buildWithoutPackage, injectAppInsightsKey, packageExtension);

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

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -40,6 +40,10 @@ export function watchTypeScript() {
4040
gulp.watch('src/**/*.ts', compileTypeScript);
4141
}
4242

43+
export function watchCss() {
44+
gulp.watch('src/**/*.css', copyViewCss);
45+
}
46+
4347
/** Copy CSS files for the results view into the output directory. */
4448
export function copyViewCss() {
4549
return gulp.src('src/**/view/*.css')

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

Lines changed: 26 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,23 @@ import * as webpack from 'webpack';
22
import { config } from './webpack.config';
33

44
export function compileView(cb: (err?: Error) => void) {
5-
webpack(config).run((error, stats) => {
5+
doWebpack(config, true, cb);
6+
}
7+
8+
export function watchView(cb: (err?: Error) => void) {
9+
const watchConfig = {
10+
...config,
11+
watch: true,
12+
watchOptions: {
13+
aggregateTimeout: 200,
14+
poll: 1000,
15+
}
16+
};
17+
doWebpack(watchConfig, false, cb);
18+
}
19+
20+
function doWebpack(internalConfig: webpack.Configuration, failOnError: boolean, cb: (err?: Error) => void) {
21+
const resultCb = (error: Error | undefined, stats?: webpack.Stats) => {
622
if (error) {
723
cb(error);
824
}
@@ -20,11 +36,16 @@ export function compileView(cb: (err?: Error) => void) {
2036
errors: true
2137
}));
2238
if (stats.hasErrors()) {
23-
cb(new Error('Compilation errors detected.'));
24-
return;
39+
if (failOnError) {
40+
cb(new Error('Compilation errors detected.'));
41+
return;
42+
} else {
43+
console.error('Compilation errors detected.');
44+
}
2545
}
46+
cb();
2647
}
48+
};
2749

28-
cb();
29-
});
50+
webpack(internalConfig, resultCb);
3051
}

0 commit comments

Comments
 (0)