Skip to content

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

Closed
wants to merge 1 commit into from

Conversation

poelzi
Copy link

@poelzi poelzi commented Oct 27, 2022

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.

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.
@rustbot
Copy link
Collaborator

rustbot commented Oct 27, 2022

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.

@rustbot rustbot added the S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. label Oct 27, 2022
Copy link
Member

@weihanglo weihanglo left a 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))
Copy link
Member

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.

Copy link
Member

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.

@weihanglo
Copy link
Member

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 🙂

@weihanglo weihanglo closed this Oct 28, 2022
@emoon
Copy link

emoon commented Sep 30, 2023

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?

@epage
Copy link
Contributor

epage commented Sep 30, 2023

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
S-waiting-on-review Status: Awaiting review from the assignee but also interested parties.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Command line option to print full file paths
6 participants