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

Conversation

koesie10
Copy link
Member

This removes checks for the following two CLI features:

  • mrvaPackCreate: This feature has always been true since CLI version v2.15.1
  • generateSummarySymbolMap: This feature has always been true since CLI version v2.18.1

Since 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.

@koesie10 koesie10 marked this pull request as ready for review July 11, 2025 15:00
@Copilot Copilot AI review requested due to automatic review settings July 11, 2025 15:00
@koesie10 koesie10 requested review from a team as code owners July 11, 2025 15:00
Copy link

@Copilot Copilot AI left a 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 and generateSummarySymbolMap 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";
Copy link
Preview

Copilot AI Jul 11, 2025

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";
Copy link
Preview

Copilot AI Jul 11, 2025

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";
Copy link
Preview

Copilot AI Jul 11, 2025

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.

@koesie10 koesie10 merged commit a327fa4 into main Jul 14, 2025
85 of 88 checks passed
@koesie10 koesie10 deleted the koesie10/remove-cli-constraints branch July 14, 2025 09:12
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants
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