Skip to content

Conversation

@tritao
Copy link
Contributor

@tritao tritao commented Apr 23, 2025

Depends on: #46

See only 8dad225 for review.

Add option to generate all paths relative to root. This adds a new generation mode that keeps all paths relative to the
root script dir.

This forces GCC to write paths in diagnostics relative to the root script, which allows VS Code to recognize the paths when ctrl-clicking the paths in compiler diagnostics in terminal.

Without this, we get path relative to the build folder, ../../foo.c, which VS Code cannot recognize and hinders instant code navigation.

@tritao tritao force-pushed the gcc-relative-diagnotics branch from 8dad225 to 7ec1195 Compare April 23, 2025 20:26
@tritao tritao changed the title Refactor c_cpp_compilation_rules function. Add option to generate all paths relative to root. Apr 23, 2025
@Jarod42
Copy link
Collaborator

Jarod42 commented Apr 24, 2025

[INFO]

Depends on: #46

Possible way is to target that branch (so current PR is retargeted once first PR is merged).
Not sure if it works cross repo though.

@tritao tritao force-pushed the gcc-relative-diagnotics branch from 7ec1195 to 7a6b0a2 Compare April 27, 2025 18:27
This adds a new generation mode that keeps all paths relative to the
root script dir.

This forces GCC to write paths in diagnostics relative to the root
script, which allows VS Code to recognize the paths when ctrl-clicking
the paths in compiler diagnostics in terminal.

Without this, we get path relative to the root, `../../foo.c`, which VS
Code cannot recognize and hinders instant code navigation.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants