Skip to content
This repository has been archived by the owner on Jun 21, 2019. It is now read-only.

Vendor crates by extracting crate files #130

Closed
luser opened this issue Oct 16, 2018 · 1 comment
Closed

Vendor crates by extracting crate files #130

luser opened this issue Oct 16, 2018 · 1 comment

Comments

@luser
Copy link

luser commented Oct 16, 2018

We've run afoul of rust-lang/cargo#5956 many times in Firefox development, and until someone figures out a way to prevent things from making changes to crate sources in the local registry, I think vendoring crates by directly extracting their crate files would be less error-prone.

Looking at the cargo source I don't think this is straightforward to do with the APIs cargo provides, unfortunately. Perhaps the closest thing to do would be to collect the set of packages, then remove those package directories, then re-run the resolution -> package get loop to force cargo to unpack fresh copies of each crate before vendoring.

alexcrichton added a commit that referenced this issue Oct 16, 2018
Work around vendoring stale contents by forcing Cargo to re-unpack all
crates which we vendor.

Closes #130
@alexcrichton
Copy link
Owner

Forcing Cargo to unpack sounds dangerously plausible! It's not compatible with concurrent invocations of Cargo but I think that's fine

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants