From fce00874bc600ca0e48322193e295adfec31744a Mon Sep 17 00:00:00 2001 From: Nathan Ridge Date: Fri, 22 Nov 2024 02:08:32 -0500 Subject: [PATCH] Revert #730 and release 0.1.33 (#736) This reverts commit ea588aa77d6eb0f75a9592d90ea68aeb9b50fbba. --- CHANGELOG.md | 5 +++++ DEVELOPING.md | 2 +- package-lock.json | 6 +++--- package.json | 11 ++--------- src/clangd-context.ts | 20 ++++++-------------- 5 files changed, 17 insertions(+), 27 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 55be681e..a95f7349 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,10 @@ # Change Log +## Version 0.1.33: November 21, 2024 + +* Reverted [#730](https://github.com/clangd/vscode-clangd/pull/730) for causing [#734](https://github.com/clangd/vscode-clangd/issues/734) + + ## Version 0.1.32: November 21, 2024 * Allow "clangd.path" to point to a shell script (restoring behavior from VS Code 1.91), behind option "clangd.useScriptAsExecutable" [#730](https://github.com/clangd/vscode-clangd/pull/730) diff --git a/DEVELOPING.md b/DEVELOPING.md index 71775fef..0d3a861f 100644 --- a/DEVELOPING.md +++ b/DEVELOPING.md @@ -48,7 +48,7 @@ recommend to run `npm run format` before sending a patch. To create a new release, create a commit that: -- increases the version number in `package.json` and `package-lock.json` +- increases the version number in `package.json` - updates `CHANGELOG.md` to cover changes since the last release Our CI will recognize the commit and publish new versions to the VSCode diff --git a/package-lock.json b/package-lock.json index 634572ca..b35e1cc0 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1,12 +1,12 @@ { "name": "vscode-clangd", - "version": "0.1.32", + "version": "0.1.33", "lockfileVersion": 2, "requires": true, "packages": { "": { "name": "vscode-clangd", - "version": "0.1.32", + "version": "0.1.33", "license": "MIT", "dependencies": { "@clangd/install": "0.1.17", @@ -5848,4 +5848,4 @@ "dev": true } } -} \ No newline at end of file +} diff --git a/package.json b/package.json index 3557f9bd..4f41d61d 100644 --- a/package.json +++ b/package.json @@ -2,7 +2,7 @@ "name": "vscode-clangd", "displayName": "clangd", "description": "C/C++ completion, navigation, and insights", - "version": "0.1.32", + "version": "0.1.33", "publisher": "llvm-vs-code-extensions", "license": "MIT", "homepage": "https://clangd.llvm.org/", @@ -78,7 +78,6 @@ "description": "In restricted mode clangd.path and clangd.arguments are not respected.", "restrictedConfigurations": [ "clangd.path", - "clangd.useScriptAsExecutable", "clangd.arguments" ] } @@ -104,12 +103,6 @@ "scope": "machine-overridable", "description": "The path to clangd executable, e.g.: /usr/bin/clangd." }, - "clangd.useScriptAsExecutable": { - "type": "boolean", - "default": "false", - "scope": "machine-overridable", - "description": "Allows the path to be a script e.g.: clangd.sh." - }, "clangd.arguments": { "type": "array", "default": [], @@ -404,4 +397,4 @@ ] } } -} \ No newline at end of file +} diff --git a/src/clangd-context.ts b/src/clangd-context.ts index b4d79a25..0fe04ff4 100644 --- a/src/clangd-context.ts +++ b/src/clangd-context.ts @@ -68,28 +68,20 @@ export class ClangdContext implements vscode.Disposable { if (!clangdPath) return null; - return new ClangdContext(subscriptions, clangdPath, outputChannel); + const clangdArguments = await config.get('arguments'); + + return new ClangdContext(subscriptions, clangdPath, clangdArguments, + outputChannel); } private constructor(subscriptions: vscode.Disposable[], clangdPath: string, + clangdArguments: string[], outputChannel: vscode.OutputChannel) { this.subscriptions = subscriptions; - const useScriptAsExecutable = config.get('useScriptAsExecutable'); - let clangdArguments = config.get('arguments'); - if (useScriptAsExecutable) { - let quote = (str: string) => { return `"${str}"`; }; - clangdPath = quote(clangdPath) - for (var i = 0; i < clangdArguments.length; i++) { - clangdArguments[i] = quote(clangdArguments[i]); - } - } const clangd: vscodelc.Executable = { command: clangdPath, args: clangdArguments, - options: { - cwd: vscode.workspace.rootPath || process.cwd(), - shell: useScriptAsExecutable - } + options: {cwd: vscode.workspace.rootPath || process.cwd()} }; const traceFile = config.get('trace'); if (!!traceFile) {