[clang-tools-extra] r361475 - [clangd-vscode] Do not customize uri converters in vscode
Kadir Cetinkaya via cfe-commits
cfe-commits at lists.llvm.org
Thu May 23 02:58:29 PDT 2019
Author: kadircet
Date: Thu May 23 02:58:29 2019
New Revision: 361475
URL: http://llvm.org/viewvc/llvm-project?rev=361475&view=rev
Log:
[clangd-vscode] Do not customize uri converters in vscode
Summary:
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.
Reviewers: ilya-biryukov
Subscribers: MaskRay, jkorous, arphaman, cfe-commits
Tags: #clang
Differential Revision: https://reviews.llvm.org/D62288
Modified:
clang-tools-extra/trunk/clangd/clients/clangd-vscode/src/extension.ts
Modified: clang-tools-extra/trunk/clangd/clients/clangd-vscode/src/extension.ts
URL: http://llvm.org/viewvc/llvm-project/clang-tools-extra/trunk/clangd/clients/clangd-vscode/src/extension.ts?rev=361475&r1=361474&r2=361475&view=diff
==============================================================================
--- clang-tools-extra/trunk/clangd/clients/clangd-vscode/src/extension.ts (original)
+++ clang-tools-extra/trunk/clangd/clients/clangd-vscode/src/extension.ts Thu May 23 02:58:29 2019
@@ -1,6 +1,5 @@
import * as vscode from 'vscode';
import * as vscodelc from 'vscode-languageclient';
-import { realpathSync } from 'fs';
/**
* Method to get workspace configuration option
@@ -87,17 +86,6 @@ export function activate(context: vscode
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
};
More information about the cfe-commits
mailing list