Skip to content

Remove unnecessary CLI feature checks #4075

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 3 commits into from
Jul 14, 2025
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Use CliConstraints consistently
  • Loading branch information
koesie10 committed Jul 11, 2025
commit adb7072cabe3e3694b3e12b2583c09e8b8f4223d
1 change: 0 additions & 1 deletion extensions/ql-vscode/src/codeql-cli/cli-version.ts
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,6 @@ interface VersionResult {
}

export interface CliFeatures {
featuresInVersionResult?: boolean;
queryServerRunQueries?: boolean;
}

Expand Down
10 changes: 9 additions & 1 deletion extensions/ql-vscode/src/codeql-cli/cli.ts
Original file line number Diff line number Diff line change
Expand Up @@ -269,7 +269,7 @@ export class CodeQLCliServer implements Disposable {
/** Path to current codeQL executable, or undefined if not running yet. */
codeQlPath: string | undefined;

cliConstraints = new CliVersionConstraint();
cliConstraints = new CliVersionConstraint(this);

/**
* When set to true, ignore some modal popups and assume user has clicked "yes".
Expand Down Expand Up @@ -1902,4 +1902,12 @@ 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.18.4");

constructor(private readonly cli: CodeQLCliServer) {
/**/
}

async supportsQueryServerRunQueries(): Promise<boolean> {
return (await this.cli.getFeatures()).queryServerRunQueries === true;
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -100,7 +100,7 @@ export class QueryServerClient extends DisposableObject {
* queries at once.
*/
async supportsRunQueriesMethod(): Promise<boolean> {
return (await this.cliServer.getFeatures()).queryServerRunQueries === true;
return await this.cliServer.cliConstraints.supportsQueryServerRunQueries();
}

/** Stops the query server by disposing of the current server process. */
Expand Down
Loading
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy