microsoft / microsoft/vscode-cpptools
Please add env/envFile support for LanguageServer
Nobody has claimed this yet.
- Dominant language
- TypeScript
- Stars
- 6.2k
- Forks
- 1.7k
- Avg merge
- 14h 46m
- Merged PRs (30d)
- 61
Description
Type: General
Describe the bug
- OS and Version: Ubuntu 19.10
- VS Code Version: 1.41.0
- C/C++ Extension Version: 0.26.2
Related issues: #4691, #4178, #3078
Description
It is common that compiler requires extra environment variables to run correctly (PATH, LD_LIBRARY_PATH, even less-known CPATH in my case) which are provided by some kind of "activation script".
Without proper setting of such variables detecting compiler's default include paths and defines doesn't work (or doesn't work as expected).
Proposal
env / envFile settings are getting more and more wide-spread and it would be awesome if cpptools respects them when detecting compiler and its settings (even via compile_commands.json).
Having such option per-configuration and per-project significantly improves experience when developer needs to switch between different compilers.
Unfortunately I couldn't find place in the repo where compiler is invoked...
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start by locating the LanguageServer compiler-detection path and its handling of compile_commands.json; the issue names no repository files or tests. Compare the requested per-configuration and per-project env/envFile behavior with the existing settings, and define done as compiler default include paths and defines being detected correctly under activated environments.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- cpp, vscode
- Domain
- developer-experience, tooling
- Issue type
- Feature
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100