Skip to content

Commit de10640

Browse files
committed
Rename global "databases" setting
1 parent 528af4a commit de10640

4 files changed

Lines changed: 11 additions & 7 deletions

File tree

extensions/ql-vscode/CHANGELOG.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,10 @@
77
## 1.9.4 - 6 November 2023
88

99
No user facing changes.
10+
- When downloading a 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)
11+
- 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)
12+
- 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.
13+
- To restore the old behavior of adding all database source folders by default, set the `codeQL.addingDatabases.addDatabaseSourceToWorkspace` setting to `true`.
1014

1115
## 1.9.3 - 26 October 2023
1216

extensions/ql-vscode/package.json

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -372,18 +372,18 @@
372372
},
373373
{
374374
"type": "object",
375-
"title": "Downloading databases",
375+
"title": "Adding databases",
376376
"order": 6,
377377
"properties": {
378-
"codeQL.databaseDownload.allowHttp": {
378+
"codeQL.addingDatabases.allowHttp": {
379379
"type": "boolean",
380380
"default": false,
381381
"description": "Allow databases to be downloaded via HTTP. Warning: enabling this option will allow downloading from insecure servers."
382382
},
383-
"codeQL.databaseDownload.addDatabaseSourceToWorkspace": {
383+
"codeQL.addingDatabases.addDatabaseSourceToWorkspace": {
384384
"type": "boolean",
385385
"default": false,
386-
"markdownDescription": "When downloading a database, automatically add the database's source folder as a workspace folder. Warning: enabling this option in a single-folder workspace will cause the workspace to reload as a [multi-root workspace](https://code.visualstudio.com/docs/editor/multi-root-workspaces). This may cause query history and database lists to be reset."
386+
"markdownDescription": "When adding a CodeQL database, automatically add the database's source folder as a workspace folder. Warning: enabling this option in a single-folder workspace will cause the workspace to reload as a [multi-root workspace](https://code.visualstudio.com/docs/editor/multi-root-workspaces). This may cause query history and database lists to be reset."
387387
}
388388
}
389389
},

extensions/ql-vscode/src/config.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -641,7 +641,7 @@ export function isCodespacesTemplate() {
641641
return !!CODESPACES_TEMPLATE.getValue<boolean>();
642642
}
643643

644-
const DATABASE_DOWNLOAD_SETTING = new Setting("databaseDownload", ROOT_SETTING);
644+
const DATABASE_DOWNLOAD_SETTING = new Setting("addingDatabases", ROOT_SETTING);
645645

646646
const ALLOW_HTTP_SETTING = new Setting("allowHttp", DATABASE_DOWNLOAD_SETTING);
647647

extensions/ql-vscode/test/vscode-tests/minimal-workspace/local-queries/local-databases.test.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -729,15 +729,15 @@ describe("local databases", () => {
729729
expect(setCurrentDatabaseItemSpy).toBeCalledTimes(1);
730730
});
731731

732-
it("should not add database source archive folder when `codeQL.databaseDownload.addDatabaseSourceToWorkspace` is `false`", async () => {
732+
it("should not add database source archive folder when `codeQL.addingDatabases.addDatabaseSourceToWorkspace` is `false`", async () => {
733733
jest.spyOn(config, "addDatabaseSourceToWorkspace").mockReturnValue(false);
734734

735735
await databaseManager.openDatabase(mockDbItem.databaseUri);
736736

737737
expect(addDatabaseSourceArchiveFolderSpy).toBeCalledTimes(0);
738738
});
739739

740-
it("should add database source archive folder when `codeQL.databaseDownload.addDatabaseSourceToWorkspace` is `true`", async () => {
740+
it("should add database source archive folder when `codeQL.addingDatabases.addDatabaseSourceToWorkspace` is `true`", async () => {
741741
jest.spyOn(config, "addDatabaseSourceToWorkspace").mockReturnValue(true);
742742

743743
await databaseManager.openDatabase(mockDbItem.databaseUri);

0 commit comments

Comments
 (0)