-
Notifications
You must be signed in to change notification settings - Fork 547
Option to resolve build diagnostics relative to workspace folder #1401
Copy link
Copy link
Closed as not planned
Labels
Feature: buildenhancementan enhancement to the product that is either not present or an improvement to an existing featurean enhancement to the product that is either not present or an improvement to an existing featurehelp wantedwe currently are not planning work on this and would like help from the open source communitywe currently are not planning work on this and would like help from the open source communitystale-exemptto use with close-stale-issues and close-old-issues botto use with close-stale-issues and close-old-issues bot
Milestone
Description
Activity
Metadata
Metadata
Assignees
Labels
Feature: buildenhancementan enhancement to the product that is either not present or an improvement to an existing featurean enhancement to the product that is either not present or an improvement to an existing featurehelp wantedwe currently are not planning work on this and would like help from the open source communitywe currently are not planning work on this and would like help from the open source communitystale-exemptto use with close-stale-issues and close-old-issues botto use with close-stale-issues and close-old-issues bot
Type
Projects
- StatusShow more project fieldsCompleted
Brief Issue Summary
It is a known problem that achieving reproducible builds with CMake requires hacks and workarounds, especially if compiler in use does not support
-ffile-prefix-map. In our project we apply some trickery to ensure that compiler is always invoked from the source root with a relative path to source file. As a result of that, compiler prints all errors and warnings with paths relative to the source root instead of absolute paths or paths relative to build directory:This confuses CMake Tools, if extension detects that path is relative, it appends it to build directory. In Problems tab we see something like:
Some relevant code:
vscode-cmake-tools/src/cmake-tools.ts
Line 912 in 8faa5da
vscode-cmake-tools/src/diagnostics/build.ts
Line 43 in 8faa5da
vscode-cmake-tools/src/diagnostics/build.ts
Line 71 in 8faa5da
vscode-cmake-tools/src/diagnostics/build.ts
Line 82 in 8faa5da
vscode-cmake-tools/src/util.ts
Lines 127 to 131 in 8faa5da
Expected:
We need some sort of configuration option to be able to resolve compiler diagnostics relative to the source root.
Apparent Behavior:
Currently, diagnostics are reported with wrong file path and cannot be opened by clicking on them.
Platform and Versions