kadircet created this revision. kadircet added a reviewer: ilya-biryukov. Herald added subscribers: cfe-commits, arphaman, jkorous, MaskRay. Herald added a project: clang.
Clangd is already resolving symlinks on the server side, therefore there is no more need to handle it in client side. This was also resulting in breakages whenever index contained a symbol coming from a non-existent file(like a generated file), e.g. during workspace symbols whole response was dropped since stat had failed. Repository: rG LLVM Github Monorepo https://reviews.llvm.org/D62288 Files: clang-tools-extra/clangd/clients/clangd-vscode/src/extension.ts Index: clang-tools-extra/clangd/clients/clangd-vscode/src/extension.ts =================================================================== --- clang-tools-extra/clangd/clients/clangd-vscode/src/extension.ts +++ clang-tools-extra/clangd/clients/clangd-vscode/src/extension.ts @@ -87,17 +87,6 @@ fileEvents: vscode.workspace.createFileSystemWatcher(filePattern) }, initializationOptions: { clangdFileStatus: true }, - // Resolve symlinks for all files provided by clangd. - // This is a workaround for a bazel + clangd issue - bazel produces a symlink tree to build in, - // and when navigating to the included file, clangd passes its path inside the symlink tree - // rather than its filesystem path. - // FIXME: remove this once clangd knows enough about bazel to resolve the - // symlinks where needed (or if this causes problems for other workflows). - uriConverters: { - code2Protocol: (value: vscode.Uri) => value.toString(), - protocol2Code: (value: string) => - vscode.Uri.file(realpathSync(vscode.Uri.parse(value).fsPath)) - }, // Do not switch to output window when clangd returns output revealOutputChannelOn: vscodelc.RevealOutputChannelOn.Never };
Index: clang-tools-extra/clangd/clients/clangd-vscode/src/extension.ts =================================================================== --- clang-tools-extra/clangd/clients/clangd-vscode/src/extension.ts +++ clang-tools-extra/clangd/clients/clangd-vscode/src/extension.ts @@ -87,17 +87,6 @@ fileEvents: vscode.workspace.createFileSystemWatcher(filePattern) }, initializationOptions: { clangdFileStatus: true }, - // Resolve symlinks for all files provided by clangd. - // This is a workaround for a bazel + clangd issue - bazel produces a symlink tree to build in, - // and when navigating to the included file, clangd passes its path inside the symlink tree - // rather than its filesystem path. - // FIXME: remove this once clangd knows enough about bazel to resolve the - // symlinks where needed (or if this causes problems for other workflows). - uriConverters: { - code2Protocol: (value: vscode.Uri) => value.toString(), - protocol2Code: (value: string) => - vscode.Uri.file(realpathSync(vscode.Uri.parse(value).fsPath)) - }, // Do not switch to output window when clangd returns output revealOutputChannelOn: vscodelc.RevealOutputChannelOn.Never };
_______________________________________________ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits