Skip to content

Commit

Permalink
Revert clangd#730 and release 0.1.33 (clangd#736)
Browse files Browse the repository at this point in the history
This reverts commit ea588aa.
  • Loading branch information
HighCommander4 authored Nov 22, 2024
1 parent 2b44eef commit fce0087
Show file tree
Hide file tree
Showing 5 changed files with 17 additions and 27 deletions.
5 changes: 5 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -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)
Expand Down
2 changes: 1 addition & 1 deletion DEVELOPING.md
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
6 changes: 3 additions & 3 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

11 changes: 2 additions & 9 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -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/",
Expand Down Expand Up @@ -78,7 +78,6 @@
"description": "In restricted mode clangd.path and clangd.arguments are not respected.",
"restrictedConfigurations": [
"clangd.path",
"clangd.useScriptAsExecutable",
"clangd.arguments"
]
}
Expand All @@ -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": [],
Expand Down Expand Up @@ -404,4 +397,4 @@
]
}
}
}
}
20 changes: 6 additions & 14 deletions src/clangd-context.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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<string[]>('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<boolean>('useScriptAsExecutable');
let clangdArguments = config.get<string[]>('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<string>('trace');
if (!!traceFile) {
Expand Down

0 comments on commit fce0087

Please sign in to comment.