Closed Bug 1574056 Opened 6 years ago Closed 6 years ago

mach vendor rust should use native cargo vendor

Categories

(Firefox Build System :: Bootstrap Configuration, defect)

defect
Not set
normal

Tracking

(firefox70 fixed)

RESOLVED FIXED
mozilla70
Tracking Status
firefox70 --- fixed

People

(Reporter: heycam, Assigned: glandium)

References

Details

Attachments

(1 file)

mach vendor rust installs cargo-vendor if it's not already installed. It does that through cargo install cargo-vendor. That fails if the libssl headers are not installed. On my Ubuntu 19.04 machine, I needed to apt install libssl-dev to get that working. mach bootstrap should install this package for me.

cargo vendor is a native tool now. mach vendor rust should use it instead of installing cargo-vendor. Although, looking around, it's not on release yet. Only on beta. So it should be released in 1.37... which is due... tomorrow?

That said, even considering the installation of cargo-vendor, it's not mach bootstrap's job to ensure cargo-vendor's dependencies. It's more mach vendor's job.

Summary: mach bootstrap should install libssl-dev → mach vendor rust should use native cargo vendor

So, interestingly, with Rust 1.37 ./mach vendor rust just plain fails to me. It calls cargo vendor --quiet --sync Cargo.lock which ends up calling the standard cargo vendor, for which --sync expects a TOML file, not a LOCK file...

Note that cargo vendor always uses the native version even when
cargo-vendor was already installed, so there is no concern wrt that.

Blocks: 1575760

For some reason, I had an issue with cargo vendor on my machine, when using mach vendor rust:

error: failed to parse manifest at `/home/ben/code/mozilla-inbound/Cargo.lock` 
Caused by:
  invalid type: map, expected a string for key `package`

I have no idea where it came from, nor did I know how to fix it. nalexander on irc spotted this patch and asked me to try it, and importing it had the issue disappear.

Benjamin, yes, that's what I described in Comment 2. Cargo is being fed a "Cargo.lock" file where it expects a TOML.

Pushed by mh@glandium.org: https://hg.mozilla.org/integration/autoland/rev/ccd4c2bcbd7a Make `mach vendor rust` use now native `cargo vendor`. r=chmanchester
Status: NEW → RESOLVED
Closed: 6 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla70
Assignee: nobody → mh+mozilla
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: