cargo
cargo copied to clipboard
fix(trim-paths): remap common prefix only
What does this PR try to resolve?
New -Ztrim-paths
remap rules for git/registry dependencies:
- Git dependencies: remove ~/.cargo/git/checkouts prefix.
- Registry dependencies: remove ~/.cargo/registry/src prefix.
This make the remap rules fixed in a finite number, minimizing the burden for users to configure debuggers.
Part of https://github.com/rust-lang/cargo/issues/13171.
How should we test and review this PR?
The new rule is a small deviation of RFC 3127. Please review if it makes sense.
This doesn't tackle relative path dependencies described in https://github.com/rust-lang/cargo/issues/13171, as git/registry should be less controversial and easier to be landed.
Additional information
r? @ehuss
(rustbot has picked a reviewer for you, use r? to override)
Had some more thoughts on the underlying proposal that I posted over at https://github.com/rust-lang/cargo/issues/13171#issuecomment-1870491266
r? @epage
I have reservations but I've been slow to work them out and this is all unstable, so there isn't really a reason to hold this up.
@bors r+
:pushpin: Commit 6e9cf8513ddf58d4aabce0f5dcc9cee82bbe74c3 has been approved by epage
It is now in the queue for this repository.
:hourglass: Testing commit 6e9cf8513ddf58d4aabce0f5dcc9cee82bbe74c3 with merge c22cc7bb8b29c281a0c1e9ce41227823d1dfa378...
:sunny: Test successful - checks-actions Approved by: epage Pushing c22cc7bb8b29c281a0c1e9ce41227823d1dfa378 to master...