Skip to content

Commit

Permalink
Remove support for CodeQL CLI versions older than v2.15.5 (#3681)
Browse files Browse the repository at this point in the history
  • Loading branch information
charisk authored Aug 5, 2024
1 parent a4fcbd0 commit af2a592
Show file tree
Hide file tree
Showing 3 changed files with 2 additions and 18 deletions.
3 changes: 1 addition & 2 deletions extensions/ql-vscode/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -1790,8 +1790,7 @@
"when": "false"
},
{
"command": "codeQL.trimCache",
"when": "codeql.supportsTrimCache"
"command": "codeQL.trimCache"
}
],
"editor/context": [
Expand Down
16 changes: 1 addition & 15 deletions extensions/ql-vscode/src/codeql-cli/cli.ts
Original file line number Diff line number Diff line change
Expand Up @@ -1755,14 +1755,6 @@ export class CodeQLCliServer implements Disposable {
this._versionChangedListeners.forEach((listener) =>
listener(newVersionAndFeatures),
);
// this._version is only undefined upon config change, so we reset CLI-based context key only when necessary.
await this.app.commands.execute(
"setContext",
"codeql.supportsTrimCache",
newVersionAndFeatures.version.compare(
CliVersionConstraint.CLI_VERSION_WITH_TRIM_CACHE,
) >= 0,
);
} catch (e) {
this._versionChangedListeners.forEach((listener) =>
listener(undefined),
Expand Down Expand Up @@ -1917,13 +1909,7 @@ function shouldDebugCliServer() {
export class CliVersionConstraint {
// The oldest version of the CLI that we support. This is used to determine
// whether to show a warning about the CLI being too old on startup.
public static OLDEST_SUPPORTED_CLI_VERSION = new SemVer("2.14.6");

/**
* CLI version where the query server supports the `evaluation/trimCache` method
* with `codeql database cleanup --mode=trim` semantics.
*/
public static CLI_VERSION_WITH_TRIM_CACHE = new SemVer("2.15.1");
public static OLDEST_SUPPORTED_CLI_VERSION = new SemVer("v2.15.5");

public static CLI_VERSION_WITHOUT_MRVA_EXTENSIBLE_PREDICATE_HACK = new SemVer(
"2.16.1",
Expand Down
1 change: 0 additions & 1 deletion extensions/ql-vscode/supported_cli_versions.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,5 @@
"v2.17.6",
"v2.16.6",
"v2.15.5",
"v2.14.6",
"nightly"
]

0 comments on commit af2a592

Please sign in to comment.