microsoft / microsoft/vscode-cpptools

includepath with network folders

Đang mở
#3,402 5 bình luận 2 reaction 0 người được giao Xem trên GitHub

Chưa có ai nhận issue này.

bug Language Service network drive
Ngôn ngữ chính
TypeScript
Star
6.2k
Fork
1.7k
Merge trung bình
14 giờ 46 phút
Pull request đã merge (30 ngày)
61

Mô tả

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 ?

Hướng dẫn đóng góp

Mở hướng dẫn đóng góp

Bắt đầu từ đâu

  1. Đọc hết issue, rồi đọc hướng dẫn đóng góp của dự án.
  2. Bình luận trên issue rằng bạn sẽ nhận — tránh hai người làm cùng một việc.
  3. Fork repository và làm thay đổi trên một nhánh.
  4. Mở pull request có tham chiếu số hiệu của issue.

Hướng nghiên cứu

Bắt đầu với includePath và các mục browse trong c_cpp_properties.json, cùng các thiết lập loại trừ trong settings.json, sau đó tái hiện lỗi Extension Host URI bằng các đường dẫn thư mục mạng được hiển thị. Kiểm tra xem các đường dẫn UNC được hỗ trợ có thể được phân giải mà không gặp lỗi đã nêu hay không; hoàn tất khi các include mạng hoạt động mà không xảy ra lỗi của provider và việc loại trừ thư mục được yêu cầu vẫn có hiệu lực.

Do mô hình lập chỉ mục viết ra từ nội dung của issue.

Đánh giá

Công nghệ
cpp, vscode
Lĩnh vực
tooling
Loại issue
Lỗi
Độ khó
4/5
Thời gian dự kiến
3-5 ngày
Mức độ hoạt động
Đình trệ
Độ rõ ràng
Khá rõ ràng
Mức phù hợp với người mới
38/100

Nhận issue mới trong hộp thư của bạn

Bản tóm tắt ngắn những issue GitHub phù hợp với người mới.