Skip to content
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

Revert #730 and release 0.1.33 #736

Merged
merged 1 commit into from
Nov 22, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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
Loading