-
Notifications
You must be signed in to change notification settings - Fork 2.6k
Add global option --absolute-paths #11297
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
Using this option will call rustc with absolute file paths and rustc will report absolute paths in error cases etc. This will cause the build cache to invalidate when the folder is moved, but will make external integrations easier.
Thanks for the pull request, and welcome! The Rust team is excited to review your changes, and you should hear from @ehuss (or someone else) soon. Please see the contribution instructions for more information. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thank you for this patch!
The purpose of this flag is fairly straightforward. However, before moving on, I think we might need a bit more discussions. I'd suggest opening a topic on t-cargo zulip stream. We can also discuss on #5450 but I feel like on zulip will gain more people participating.
@@ -470,6 +472,7 @@ See 'cargo help <command>' for more information on a specific command.\n", | |||
.arg(flag("frozen", "Require Cargo.lock and cache are up to date").global(true)) | |||
.arg(flag("locked", "Require Cargo.lock is up to date").global(true)) | |||
.arg(flag("offline", "Run without accessing the network").global(true)) | |||
.arg(flag("absolute-paths", "Use absolute paths when calling rust").global(true)) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I am not sure. Should this be global? Some commands might not need it. Or maybe it controls not only "rustc invocations" but also all output related to filesystem paths.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Also, I feel like this should be a -Z
flag (unstable flag) first.
While I do appreciate your interest in this feature, I am going to close this. Let't focus on design and discussion first, and then collaborate on the solution. I'll also take this to the incoming Cargo meeting if there is any available slot. Thank you 🙂 |
I know this PR is closed, but the original issue #5450 is still open so I wonder if there has been made any progress on adding this? |
Based on the reasoning this was closed, the issue and zulip are the places to observe any progress. If there isn't any, its because no one is stepping up to lead it. If you want to, id recommend looking at the related issues. Personally, id also recommend considering a config setting, rather than a flag. |
Using this option will call rustc with absolute file paths and rustc will report absolute paths in error cases etc. This will cause the build cache to invalidate when the folder is moved, but will make external integrations easier.
What does this PR try to resolve?
Closes #5450
Adds option
--absolute-paths
that will run and print absolute paths when invoking rustc.This makes integration in IDEs easier and allows output paths to be clicked.