Skip to content

Commit

Permalink
Remove feature flags for queries panel + language selector (#3075)
Browse files Browse the repository at this point in the history
  • Loading branch information
shati-patel authored Nov 16, 2023
1 parent ec7640f commit d360815
Show file tree
Hide file tree
Showing 4 changed files with 7 additions and 23 deletions.
5 changes: 5 additions & 0 deletions extensions/ql-vscode/CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,11 @@

## [UNRELEASED]

- Add new CodeQL views for managing databases and queries:
1. A queries panel, to create and run queries in one place.
2. A language selector, to quickly determine the language compatibility of databases and queries.

For more information, see the [documentation](https://codeql.github.com/docs/codeql-for-visual-studio-code/analyzing-your-projects/#filtering-databases-and-queries-by-language).
- When adding a CodeQL database, we no longer add the database source folder to the workspace by default (since this caused bugs in single-folder workspaces). [#3047](https://github.com/github/vscode-codeql/pull/3047)
- You can manually add individual database source folders to the workspace with the "Add Database Source to Workspace" right-click command in the databases view.
- To restore the old behavior of adding all database source folders by default, set the `codeQL.addingDatabases.addDatabaseSourceToWorkspace` setting to `true`.
Expand Down
10 changes: 2 additions & 8 deletions extensions/ql-vscode/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -1686,10 +1686,6 @@
"command": "codeQL.mockGitHubApiServer.unloadScenario",
"when": "config.codeQL.mockGitHubApiServer.enabled && codeQL.mockGitHubApiServer.scenarioLoaded"
},
{
"command": "codeQL.createQuery",
"when": "config.codeQL.codespacesTemplate || config.codeQL.canary && config.codeQL.queriesPanel"
},
{
"command": "codeQLTests.acceptOutputContextTestItem",
"when": "false"
Expand Down Expand Up @@ -1774,17 +1770,15 @@
"ql-container": [
{
"id": "codeQLLanguageSelection",
"name": "Language",
"when": "config.codeQL.canary && config.codeQL.showLanguageFilter"
"name": "Language"
},
{
"id": "codeQLDatabases",
"name": "Databases"
},
{
"id": "codeQLQueries",
"name": "Queries",
"when": "config.codeQL.canary && config.codeQL.queriesPanel"
"name": "Queries"
},
{
"id": "codeQLVariantAnalysisRepositories",
Expand Down
9 changes: 0 additions & 9 deletions extensions/ql-vscode/src/config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -710,15 +710,6 @@ export async function setAutogenerateQlPacks(choice: AutogenerateQLPacks) {
);
}

/**
* A flag indicating whether to show the queries panel in the QL view container.
*/
const QUERIES_PANEL = new Setting("queriesPanel", ROOT_SETTING);

export function showQueriesPanel(): boolean {
return !!QUERIES_PANEL.getValue<boolean>();
}

const MODEL_SETTING = new Setting("model", ROOT_SETTING);
const FLOW_GENERATION = new Setting("flowGeneration", MODEL_SETTING);
const LLM_GENERATION = new Setting("llmGeneration", MODEL_SETTING);
Expand Down
6 changes: 0 additions & 6 deletions extensions/ql-vscode/src/queries-panel/queries-module.ts
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
import { CodeQLCliServer } from "../codeql-cli/cli";
import { extLogger } from "../common/logging/vscode";
import { App } from "../common/app";
import { isCanary, showQueriesPanel } from "../config";
import { DisposableObject } from "../common/disposable-object";
import { QueriesPanel } from "./queries-panel";
import { QueryDiscovery } from "./query-discovery";
Expand Down Expand Up @@ -41,11 +40,6 @@ export class QueriesModule extends DisposableObject {
langauageContext: LanguageContextStore,
cliServer: CodeQLCliServer,
): void {
// Currently, we only want to expose the new panel when we are in canary mode
// and the user has enabled the "Show queries panel" flag.
if (!isCanary() || !showQueriesPanel()) {
return;
}
void extLogger.log("Initializing queries panel.");

const queryPackDiscovery = new QueryPackDiscovery(cliServer);
Expand Down

0 comments on commit d360815

Please sign in to comment.