Skip to content

Commit e80ef7c

Browse files
committed
Remove CLI_VERSION_WITH_PER_QUERY_EVAL_LOG constraint
1 parent 0f59470 commit e80ef7c

5 files changed

Lines changed: 6 additions & 41 deletions

File tree

extensions/ql-vscode/package.json

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1077,17 +1077,17 @@
10771077
{
10781078
"command": "codeQLQueryHistory.showEvalLog",
10791079
"group": "4_queryHistory@1",
1080-
"when": "codeql.supportsEvalLog && viewItem == rawResultsItem || codeql.supportsEvalLog && viewItem == interpretedResultsItem || codeql.supportsEvalLog && viewItem == cancelledResultsItem"
1080+
"when": "viewItem == rawResultsItem || viewItem == interpretedResultsItem || viewItem == cancelledResultsItem"
10811081
},
10821082
{
10831083
"command": "codeQLQueryHistory.showEvalLogSummary",
10841084
"group": "4_queryHistory@2",
1085-
"when": "codeql.supportsEvalLog && viewItem == rawResultsItem || codeql.supportsEvalLog && viewItem == interpretedResultsItem || codeql.supportsEvalLog && viewItem == cancelledResultsItem"
1085+
"when": "viewItem == rawResultsItem || viewItem == interpretedResultsItem || viewItem == cancelledResultsItem"
10861086
},
10871087
{
10881088
"command": "codeQLQueryHistory.showEvalLogViewer",
10891089
"group": "4_queryHistory@3",
1090-
"when": "config.codeQL.canary && codeql.supportsEvalLog && viewItem == rawResultsItem || config.codeQL.canary && codeql.supportsEvalLog && viewItem == interpretedResultsItem || config.codeQL.canary && codeql.supportsEvalLog && viewItem == cancelledResultsItem"
1090+
"when": "config.codeQL.canary && viewItem == rawResultsItem || config.codeQL.canary && viewItem == interpretedResultsItem || config.codeQL.canary && viewItem == cancelledResultsItem"
10911091
},
10921092
{
10931093
"command": "codeQLQueryHistory.showQueryText",

extensions/ql-vscode/src/codeql-cli/cli.ts

Lines changed: 0 additions & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -1468,13 +1468,6 @@ export class CodeQLCliServer implements Disposable {
14681468
);
14691469

14701470
// this._version is only undefined upon config change, so we reset CLI-based context key only when necessary.
1471-
await this.app.commands.execute(
1472-
"setContext",
1473-
"codeql.supportsEvalLog",
1474-
newVersion.compare(
1475-
CliVersionConstraint.CLI_VERSION_WITH_PER_QUERY_EVAL_LOG,
1476-
) >= 0,
1477-
);
14781471
await this.app.commands.execute(
14791472
"setContext",
14801473
"codeql.supportsQuickEvalCount",
@@ -1803,17 +1796,6 @@ export class CliVersionConstraint {
18031796
*/
18041797
public static CLI_VERSION_WITH_RESOLVE_EXTENSIONS = new SemVer("2.10.2");
18051798

1806-
/**
1807-
* CLI version that supports rotating structured logs to produce one per query.
1808-
*
1809-
* Note that 2.8.4 supports generating the evaluation logs and summaries,
1810-
* but 2.9.0 includes a new option to produce the end-of-query summary logs to
1811-
* the query server console. For simplicity we gate all features behind 2.9.0,
1812-
* but if a user is tied to the 2.8 release, we can enable evaluator logs
1813-
* and summaries for them.
1814-
*/
1815-
public static CLI_VERSION_WITH_PER_QUERY_EVAL_LOG = new SemVer("2.9.0");
1816-
18171799
/**
18181800
* CLI version that supports the `--sourcemap` option for log generation.
18191801
*/
@@ -1879,12 +1861,6 @@ export class CliVersionConstraint {
18791861
);
18801862
}
18811863

1882-
async supportsPerQueryEvalLog() {
1883-
return this.isVersionAtLeast(
1884-
CliVersionConstraint.CLI_VERSION_WITH_PER_QUERY_EVAL_LOG,
1885-
);
1886-
}
1887-
18881864
async supportsSourceMap() {
18891865
return this.isVersionAtLeast(
18901866
CliVersionConstraint.CLI_VERSION_WITH_SOURCEMAP,

extensions/ql-vscode/src/query-history/query-history-manager.ts

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,6 @@ import {
3636
} from "./query-status";
3737
import { readQueryHistoryFromFile, writeQueryHistoryToFile } from "./store";
3838
import { pathExists } from "fs-extra";
39-
import { CliVersionConstraint } from "../codeql-cli/cli";
4039
import { HistoryItemLabelProvider } from "./history-item-label-provider";
4140
import { ResultsView, WebviewReveal } from "../local-queries";
4241
import { EvalLogTreeBuilder, EvalLogViewer } from "../query-evaluation-logging";
@@ -760,7 +759,7 @@ export class QueryHistoryManager extends DisposableObject {
760759
private warnNoEvalLogs() {
761760
void showAndLogWarningMessage(
762761
this.app.logger,
763-
`Evaluator log, summary, and viewer are not available for this run. Perhaps it failed before evaluation, or you are running with a version of CodeQL before ' + ${CliVersionConstraint.CLI_VERSION_WITH_PER_QUERY_EVAL_LOG}?`,
762+
`Evaluator log, summary, and viewer are not available for this run. Perhaps it failed before evaluation?`,
764763
);
765764
}
766765

extensions/ql-vscode/src/query-server/legacy/query-server-client.ts

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -146,10 +146,6 @@ export class QueryServerClient extends DisposableObject {
146146

147147
args.push("--require-db-registration");
148148

149-
if (!(await this.cliServer.cliConstraints.supportsPerQueryEvalLog())) {
150-
args.push("--old-eval-stats");
151-
}
152-
153149
const structuredLogFile = `${this.opts.contextStoragePath}/structured-evaluator-log.json`;
154150
await ensureFile(structuredLogFile);
155151

extensions/ql-vscode/src/query-server/legacy/run-queries.ts

Lines changed: 2 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -129,10 +129,7 @@ async function runQuery(
129129
dbDir: dbContents.datasetUri.fsPath,
130130
workingSet: "default",
131131
};
132-
if (
133-
generateEvalLog &&
134-
(await qs.cliServer.cliConstraints.supportsPerQueryEvalLog())
135-
) {
132+
if (generateEvalLog) {
136133
await qs.sendRequest(messages.startLog, {
137134
db: dataset,
138135
logPath: outputDir.evalLogPath,
@@ -149,10 +146,7 @@ async function runQuery(
149146
await qs.sendRequest(messages.runQueries, params, token, progress);
150147
} finally {
151148
qs.unRegisterCallback(callbackId);
152-
if (
153-
generateEvalLog &&
154-
(await qs.cliServer.cliConstraints.supportsPerQueryEvalLog())
155-
) {
149+
if (generateEvalLog) {
156150
await qs.sendRequest(messages.endLog, {
157151
db: dataset,
158152
logPath: outputDir.evalLogPath,

0 commit comments

Comments
 (0)