-
Notifications
You must be signed in to change notification settings - Fork 202
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
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pull Request Overview
This PR removes unnecessary CLI feature checks for two features that have been available since versions before the minimum supported CLI version. It simplifies the codebase by removing conditional logic that was checking for mrvaPackCreate
and generateSummarySymbolMap
features.
- Removes feature checks for
mrvaPackCreate
andgenerateSummarySymbolMap
which are always available - Eliminates fallback code paths that were only needed for older CLI versions
- Simplifies the remote query execution logic by removing conditional branches
Reviewed Changes
Copilot reviewed 6 out of 6 changed files in this pull request and generated 3 comments.
Show a summary per file
File | Description |
---|---|
extensions/ql-vscode/src/variant-analysis/run-remote-query.ts | Removes mrvaPackCreate feature check and associated fallback code for copying/fixing query packs |
extensions/ql-vscode/src/run-queries-shared.ts | Removes generateSummarySymbolMap feature check and fallback summary parsing logic |
extensions/ql-vscode/src/query-server/query-server-client.ts | Refactors feature check to use cliConstraints method instead of direct feature access |
extensions/ql-vscode/src/log-insights/summary-parser.ts | Removes unused summary parsing functions that were fallbacks for older CLI versions |
extensions/ql-vscode/src/codeql-cli/cli.ts | Removes feature check methods and simplifies log summary generation |
extensions/ql-vscode/src/codeql-cli/cli-version.ts | Removes feature flags from interface that are no longer needed |
import { Uri, window } from "vscode"; | ||
import { join, sep, basename, relative } from "path"; | ||
import { dump, load } from "js-yaml"; | ||
import { window } from "vscode"; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The import statement removes Uri but Uri might still be used elsewhere in the file. Verify that all Uri usages have been removed with the deleted copyExistingQueryPack function.
Copilot uses AI. Check for mistakes.
import { join, sep, basename, relative } from "path"; | ||
import { dump, load } from "js-yaml"; | ||
import { window } from "vscode"; | ||
import { join, basename, relative } from "path"; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The import statement removes sep from path imports, but sep was used in the deleted copyExistingQueryPack function. Verify that sep is not used elsewhere in the file.
Copilot uses AI. Check for mistakes.
import { dump, load } from "js-yaml"; | ||
import { window } from "vscode"; | ||
import { join, basename, relative } from "path"; | ||
import { dump } from "js-yaml"; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The import statement removes load from js-yaml imports, but load was used in deleted functions. Verify that load is not used elsewhere in the file.
Copilot uses AI. Check for mistakes.
This removes checks for the following two CLI features:
mrvaPackCreate
: This feature has always been true since CLI version v2.15.1generateSummarySymbolMap
: This feature has always been true since CLI version v2.18.1Since the oldest version we support is v2.18.4, we can remove all code that would be run if these features were false.
We don't need a CHANGELOG entry since the extension already doesn't support versions below v2.18.4.