microsoft / microsoft/vscode-cpptools-api
Include flags with relative directories always resolve relative to workspace
Nobody has claimed this yet.
- Dominant language
- TypeScript
- Stars
- 33
- Forks
- 20
- PR merge metrics
- No merged PRs in 30d
Description
Problem
If a SourceFileConfiguration includes a entry in compilerFragments like /I..\foo, cpptools will attempt to resolve that include directory relative to the VS Code workspace root and silently discard the flag if the directory does not exist. However, it's possible that the compiler process was invoked with a different working directory than the workspace root, and the relative include directory would have resolved successfully relative to the compiler's working directory.
Suggested fix
Add a new readonly directory?: string; property to SourceFileConfiguration that specifies the working directory of the compiler process. Relative paths in compilerFragments should resolve relative to directory, if it is defined.
Contributor guide
No contributing guide indexed for this repository
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 SourceFileConfiguration declaration and the code that resolves compilerFragments relative to the VS Code workspace root. Verify how compiler working directories are represented, then ensure a defined directory is used for relative include paths and that the new optional property is exposed in the public API.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- typescript
- Domain
- api
- Issue type
- Feature
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Clearly specified
- Newbie friendliness
- 55/100