Closed Bug 1612092 Opened 4 years ago Closed 4 years ago

When adding a new crate to firefox, dealing with constant merging of Cargo.lock is annoying from a developer ergonomic standpoint

Categories

(Firefox Build System :: General, enhancement)

enhancement
Not set
normal

Tracking

(firefox74 fixed)

RESOLVED FIXED
mozilla74
Tracking Status
firefox74 --- fixed

People

(Reporter: chutten, Assigned: emilio)

Details

Attachments

(2 files)

When adding glean_preview to m-c I had a rather long time getting it into shape. Every time I rebased I had to deal with merge conflicts in Cargo.lock.

This wasn't particularly difficult, but also not particularly fun (and given the complexity it seems likely that I could've human error'd my way into a bad state).

I hear that there's a newer version for lock files (that Servo's using) where they're easier to merge. Maybe we could do that?

Just for completeness's sake, here is the initial issue for the new lockfile format:

https://github.com/rust-lang/cargo/pull/7070

Here is the issue for making it the default:

https://github.com/rust-lang/cargo/pull/7579

And here are the docs on how to do the translation:

https://docs.rs/cargo-lock/4.0.1/cargo_lock/#translate-convert-cargolock-files-between-the-v1-and-v2-formats

I don't have a tree on this computer to see what things look like, but I'm willing to do the conversion when I have a tree again. Anybody else want to try? This would be a good time to try, as with the All-Hands in Berlin, the tree is fairly quiet.

Note that we may or may not need to update cbindgen at the same time. Not sure if the current version in-tree has the fix for https://github.com/eqrion/cbindgen/issues/436.

Assignee: nobody → emilio

v0.12.2 at least is needed to have proper v2 lockfile support.

But v0.13.0 contains extra fixes, and features that wgpu and the style system
plan to use, so let's just update to that.

Running cargo lock translate, and then mach build (as the later does change
the whitespace in the lockfile).

Depends on D61334

Status: NEW → RESOLVED
Closed: 4 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla74
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: