microsoft / microsoft/vscode-cpptools

includepath with network folders

オープン
#3,402 コメント 5 件 リアクション 2 件 担当者 0 名 GitHub で見る

まだ誰も着手していません。

bug Language Service network drive
主要言語
TypeScript
スター
6.2k
フォーク
1.7k
平均マージ
14時間 46分
マージ済み PR(30日)
61

説明

I have a C++ workspace with following folder hierarchy

myWorkspace/
myWorkspace/component1/ImportedInterfaces/*.h --> need to exclude this folder
myWorkspace/component1/publicinterfaces/*.h
myWorkspace/component1/module1/localinterfaces/*.h
myWorkspace/component1/module1/src/*.cpp
myWorkspace/component2/ImportedInterfaces/*.h --> need to exclude this folder
myWorkspace/component2/publicinterfaces/*.h
myWorkspace/component2/module1/localinterfaces/*.h
myWorkspace/component2/module1/src/*.cpp

myWorkspace also depends on two other workspace folders on the network with similar hierarchy:

\\machine1\home\users\myDependentWorkspace1
\\machine2\home\users\myDependentWorkspace2

below is my c_cpp_properties.json file:

{
    "configurations": [
        {
            "name": "Win32",
            "includePath": [
                "${workspaceFolder}/**",
                "//machine1//home/users/myDependentWorkspace1/**",
                "//machine2//home/users/myDependentWorkspace1/**",
                ],
            "windowsSdkVersion": "10.0.14393.0",
            "compilerPath": "C:/Program Files (x86)/Microsoft Visual Studio 14.0/VC/bin/cl.exe",
            "cStandard": "c11",
            "cppStandard": "c++11",
            "intelliSenseMode": "msvc-x64",
            "browse": {
                "path": [
                    "${workspaceFolder}/**",
                "//machine1//home/users/myDependentWorkspace1/**",
                "//machine2//home/users/myDependentWorkspace1/**",
                ],
            }
        }
    ],
    "version": 4
}

=============================
for folder exclusion i have the following in my settings.json file:

"C_Cpp.intelliSenseEngineFallback": "Enabled",
    "C_Cpp.loggingLevel": "Debug",
    "C_Cpp.exclusionPolicy": "checkFolders",
    "files.exclude": {
       "**/ImportedInterfaces": true
    }

========================================
I see the following message in Log(Extension Host):

[2019-04-03 16:05:17.018] [exthost] [error] [ms-vscode.cpptools] provider FAILED
[2019-04-03 16:05:17.018] [exthost] [error] Error: [UriError]: If a URI does not contain an authority component, then the path cannot begin with two slash characters ("//")
	at c:\Program Files\Microsoft VS Code\resources\app\out\vs\workbench\services\extensions\node\extensionHostProcess.js:111:329
	at new d (c:\Program Files\Microsoft VS Code\resources\app\out\vs\workbench\services\extensions\node\extensionHostProcess.js:111:464)
	at new f (c:\Program Files\Microsoft VS Code\resources\app\out\vs\workbench\services\extensions\node\extensionHostProcess.js:112:671)
	at Function.parse (c:\Program Files\Microsoft VS Code\resources\app\out\vs\workbench\services\extensions\node\extensionHostProcess.js:112:11)
	at nullConverter (C:\Users\rip\.vscode\extensions\ms-vscode.cpptools-0.22.1\node_modules\vscode-languageclient\lib\protocolConverter.js:22:47)
	at asLocation (C:\Users\rip\.vscode\extensions\ms-vscode.cpptools-0.22.1\node_modules\vscode-languageclient\lib\protocolConverter.js:300:34)
	at item.map (C:\Users\rip\.vscode\extensions\ms-vscode.cpptools-0.22.1\node_modules\vscode-languageclient\lib\protocolConverter.js:290:43)
	at Array.map (<anonymous>)
	at asDefinitionResult (C:\Users\rip\.vscode\extensions\ms-vscode.cpptools-0.22.1\node_modules\vscode-languageclient\lib\protocolConverter.js:290:25)

Workaround is to copy all these folders to a local folder(e:\folder or d:\folder). Include paths to local drive folders work fine. Is network drive folders supported in VSCode. If so, how do we point to it via includepath ?

コントリビューションガイド

コントリビューションガイドを開く

はじめの一歩

  1. issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
  2. 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
  3. リポジトリをフォークし、ブランチを切って変更します。
  4. issue 番号を参照したプルリクエストを送ります。

調査の方向性

まず c_cpp_properties.json の includePath と browse エントリ、および settings.json の除外設定を確認し、次に示されているネットワークフォルダーのパスを使って Extension Host URI エラーを再現します。サポートされている UNC パスを報告されたエラーなしで解決できるか確認します。完了条件は、ネットワークの include が provider の失敗なしに機能し、要求されたフォルダーの除外が有効なままであることです。

索引モデルが issue の本文から書いたものです。

評価

技術スタック
cpp, vscode
領域
tooling
issue の種類
バグ
難易度
4/5
見積もり時間
3〜5日
活発さ
停滞
明瞭さ
おおむね明確
初心者へのやさしさ
38/100

新しい issue をメールで受け取る

初心者向けの GitHub issue を短くまとめたダイジェスト。