microsoft / microsoft/vscode-cpptools

includePath support for non-local paths `ssh://` in particular

Open
#2,268 9 comments 19 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Feature Request Language Service network drive
Dominant language
TypeScript
Stars
6.2k
Forks
1.7k
Avg merge
14h 46m
Merged PRs (30d)
61

Description

Type: LanguageService
----- Input information below -----

Please review existing issues and our documentation at https://github.com/Microsoft/vscode-cpptools/tree/master/Documentation prior to filing an issue.

Describe the bug

  • OS and Version: Windows 7 Enterprise
  • VS Code Version: 1.25.1
  • C/C++ Extension Version: 0.17.6
  • Other extensions you installed (and if the issue persists after disabling them): SSH FS 1.9.2

IntelliSense fails to parse files provided by extensions that implement FileSystemProvider. In my case: SSH-FS https://github.com/SchoofsKelvin/vscode-sshfs/issues/27

To Reproduce

  1. install vscode-cpptools
  2. install vscode-sshfs
  3. configure a remote directory in user settings
  4. configure c_cpp_properties.js includePath to use the ssh FileSystemProvider

Expected behavior
IntelliSense should work as it does for local files

User Settings:

"sshfs.configs": [
        {
            "name": "home",
            "label": "jwieber",
            "root": "/home/jwieber",
            "host": "my.host.domain",
            "port": 1234,
            "username": "jwieber",
            "agent": "C:\\cygwin64\\bin\\ssh-agent.exe",
            "privateKeyPath": "C:\\Users\\jwieber\\.ssh\\id_rsa.ppk"
        },
        {
            "name": "repo",
            "root": "/path/to/my/repo",
            "host": "my.host.domain",
            "port": 1234,
            "username": "jwieber",
            "agent": "C:\\cygwin64\\bin\\ssh-agent.exe",
            "privateKeyPath": "C:\\Users\\jwieber\\.ssh\\id_rsa.ppk"
        }
    ]

code-workspace

{
	"folders": [		
		{
			"path": "./fdmdbsvc"
		},
		{
			"uri": "ssh://home/",
			"name": "SSH FS - home"
		},
		{
			"uri": "ssh://repo/",
			"name": "SSH FS - repo"
		}
	],
	"settings": {
		"files.associations": {
			"*.ipp": "cpp"
		}
	}
}

c_cpp_properties.json

{
    "configurations": [
        {
            "name": "Win32",
            "includePath": [
                "${workspaceFolder}",
                "ssh://repo/"
            ],
            "defines": [
                "_DEBUG",
                "UNICODE",
                "_UNICODE"
            ],
            "compilerPath": "C:\\cygwin64\\bin\\gcc.exe",
            "intelliSenseMode": "clang-x64"
             "cStandard": "c11",
            "cppStandard": "c++17"
        }
    ],
    "version": 4
}

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Reproduce the failure with the SSH FS workspace in code-workspace and the ssh://repo/ entry in c_cpp_properties.json. Start by tracing how includePath is consumed for IntelliSense and how FileSystemProvider-backed paths are handled; done means IntelliSense parses files from the remote path as it does local files.

Written by the indexing model from the issue text.

Assessment

Tech stack
cpp, typescript
Domain
developer-experience, tooling
Issue type
Feature
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
32/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.