mach should provide a convenient way to replace third party crate with local code

RESOLVED DUPLICATE of bug 1323557

Status

RESOLVED DUPLICATE of bug 1323557
a year ago
9 months ago

People

(Reporter: xidorn, Unassigned)

Tracking

(Blocks: 1 bug)

Trunk

Firefox Tracking Flags

(Not tracked)

Details

(Reporter)

Description

a year ago
Sometimes we need to debug or try some fixes in third party crate code.

This is painful currently because Cargo would refuse to build if we touch the code it vendors, and if we want to use the [replace] approach provided by Cargo, we need to:
1. check out the code ourselves
2. add a [replace] section to both toolkit/library/rust/Cargo.toml and toolkit/library/gtest/rust/Cargo.toml
3. update the lock files of them

That is lots of manual steps.

I've been tired doing this every time I need to debug bindgen :(
(Reporter)

Comment 1

a year ago
I think I should have filed a bug about this before... but I cannot find...
(Reporter)

Comment 2

a year ago
The first step isn't a big problem. The second step could be a problem because I keep forgetting how to write that, and need to check the document. The third step is the most annoying one because I need to find the code of |mach vendor rust| to be sure what do I need to do.
I think this is something *cargo* should be addressing.
I'm pretty sure I've already said something like comment 3 in some other bug, but I can't find it. I found another bug for the same thing, though.
Status: NEW → RESOLVED
Last Resolved: a year ago
Resolution: --- → DUPLICATE
Duplicate of bug: 1323557
Aha! found the other: bug 1365666
(Reporter)

Comment 6

a year ago
cargo already addressed this by providing [replace] mechanism which should enough for mach to wrapper around, and alexcrichton's cargo-edit-locally looks useful as well as mentioned in bug 1365666 comment 15.

Updated

9 months ago
Product: Core → Firefox Build System
You need to log in before you can comment on or make changes to this bug.