From 6053663b00425a151bc0b4c89ec4d081532cc5d7 Mon Sep 17 00:00:00 2001 From: Nick Rolfe Date: Wed, 17 Sep 2025 12:00:30 +0000 Subject: [PATCH 1/2] Don't attempt to interpret results when running quick-eval 459d6a9b introduced a bug where quickEvalPosition -- which indicates that the query was spawned via quick-eval -- was not being passed through in the completed query info. This meant the extension tried to interpret the results with the metadata from the enclosing file, which would then fail if it was a .ql file with metadata. --- extensions/ql-vscode/src/local-queries/local-query-run.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/extensions/ql-vscode/src/local-queries/local-query-run.ts b/extensions/ql-vscode/src/local-queries/local-query-run.ts index cbe151a6601..c2d6dec5972 100644 --- a/extensions/ql-vscode/src/local-queries/local-query-run.ts +++ b/extensions/ql-vscode/src/local-queries/local-query-run.ts @@ -188,7 +188,7 @@ export class LocalQueryRun { result.outputBaseName, this.dbItem.databaseUri.fsPath, await this.dbItem.hasMetadataFile(), - undefined, + this.queryInfo.initialInfo.quickEvalPosition, metadata, ); From a2a27c30ebbc93126d158096b7a8adbd373ec7b8 Mon Sep 17 00:00:00 2001 From: Nick Rolfe Date: Wed, 17 Sep 2025 14:14:36 +0100 Subject: [PATCH 2/2] Add changelog for quick-eval metadata fix --- extensions/ql-vscode/CHANGELOG.md | 1 + 1 file changed, 1 insertion(+) diff --git a/extensions/ql-vscode/CHANGELOG.md b/extensions/ql-vscode/CHANGELOG.md index 0b3c1bfb4c2..73a17978226 100644 --- a/extensions/ql-vscode/CHANGELOG.md +++ b/extensions/ql-vscode/CHANGELOG.md @@ -4,6 +4,7 @@ - Add new command "CodeQL: Trim Overlay Base Cache" that returns a database to the state prior to overlay evaluation, leaving only base predicates and types that may later be referenced during overlay evaluation. [#4082](https://github.com/github/vscode-codeql/pull/4082) - Remove support for CodeQL CLI versions older than 2.19.4. [#4108](https://github.com/github/vscode-codeql/pull/4108) +- Fix a bug where quick evaluation within a `.ql` file could cause spurious errors about processing query metadata. [#4141](https://github.com/github/vscode-codeql/pull/4141) ## 1.17.4 - 10 July 2025