cargo icon indicating copy to clipboard operation
cargo copied to clipboard

fix(trim-paths): remap common prefix only

Open weihanglo opened this issue 6 months ago • 1 comments

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

weihanglo avatar Dec 26 '23 18:12 weihanglo

r? @ehuss

(rustbot has picked a reviewer for you, use r? to override)

rustbot avatar Dec 26 '23 18:12 rustbot

Had some more thoughts on the underlying proposal that I posted over at https://github.com/rust-lang/cargo/issues/13171#issuecomment-1870491266

epage avatar Dec 27 '23 17:12 epage

r? @epage

ehuss avatar Jan 08 '24 17:01 ehuss

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+

epage avatar Jan 19 '24 21:01 epage

:pushpin: Commit 6e9cf8513ddf58d4aabce0f5dcc9cee82bbe74c3 has been approved by epage

It is now in the queue for this repository.

bors avatar Jan 19 '24 21:01 bors

:hourglass: Testing commit 6e9cf8513ddf58d4aabce0f5dcc9cee82bbe74c3 with merge c22cc7bb8b29c281a0c1e9ce41227823d1dfa378...

bors avatar Jan 19 '24 21:01 bors

:sunny: Test successful - checks-actions Approved by: epage Pushing c22cc7bb8b29c281a0c1e9ce41227823d1dfa378 to master...

bors avatar Jan 19 '24 22:01 bors