Skip to content
This repository has been archived by the owner on Nov 8, 2018. It is now read-only.

rust download directory shouldn't be merged on version upgrade #4

Closed
mcoffin opened this issue Dec 15, 2015 · 0 comments
Closed

rust download directory shouldn't be merged on version upgrade #4

mcoffin opened this issue Dec 15, 2015 · 0 comments

Comments

@mcoffin
Copy link

mcoffin commented Dec 15, 2015

Currently, if a version upgrade happens upstream on the user's rustc before the user cleans their cargo git cache, the build script will download the new version of rust, and merge the tarball with the existing working directory when unzipping.

If the versions differ, the build script should delete the existing rust directory, and unzip the tarball in to a clean directory instead.

This is, at the very least, the root cause of hackndev/zinc#336, and potentially many other libcore-related compilation issues.

Error paste for those searching

Running `rustc /home/mcoffin/.multirust/toolchains/nightly/cargo/git/checkouts/rust-libcore-a3e1d25b35d5cd12/master/rust/src/libcore/lib.rs --crate-name core --crate-type lib -C opt-level=3 -C metadata=26832fbb16a66e92 -C extra-filename=-26832fbb16a66e92 --out-dir /home/mcoffin/workspace/zinc/examples/empty/target/thumbv6m-none-eabi/release/deps --emit=dep-info,link --target thumbv6m-none-eabi -C ar=arm-none-eabi-ar -C linker=arm-none-eabi-gcc -L dependency=/home/mcoffin/workspace/zinc/examples/empty/target/thumbv6m-none-eabi/release/deps -L dependency=/home/mcoffin/workspace/zinc/examples/empty/target/thumbv6m-none-eabi/release/deps --cap-lints allow`
/home/mcoffin/.multirust/toolchains/nightly/cargo/git/checkouts/rust-libcore-a3e1d25b35d5cd12/master/rust/src/libcore/lib.rs:124:9: 124:16 error: file for module `prelude` found at both prelude.rs and prelude/mod.rs
/home/mcoffin/.multirust/toolchains/nightly/cargo/git/checkouts/rust-libcore-a3e1d25b35d5cd12/master/rust/src/libcore/lib.rs:124 pub mod prelude;
                                                                                                                                         ^~~~~~~
/home/mcoffin/.multirust/toolchains/nightly/cargo/git/checkouts/rust-libcore-a3e1d25b35d5cd12/master/rust/src/libcore/lib.rs:124:9: 124:16 help: delete or rename one of them to remove the ambiguity
Build failed, waiting for other jobs to finish...
Could not compile `core`.

Caused by:
  Process didn't exit successfully: `rustc /home/mcoffin/.multirust/toolchains/nightly/cargo/git/checkouts/rust-libcore-a3e1d25b35d5cd12/master/rust/src/libcore/lib.rs --crate-name core --crate-type lib -C opt-level=3 -C metadata=26832fbb16a66e92 -C extra-filename=-26832fbb16a66e92 --out-dir /home/mcoffin/workspace/zinc/examples/empty/target/thumbv6m-none-eabi/release/deps --emit=dep-info,link --target thumbv6m-none-eabi -C ar=arm-none-eabi-ar -C linker=arm-none-eabi-gcc -L dependency=/home/mcoffin/workspace/zinc/examples/empty/target/thumbv6m-none-eabi/release/deps -L dependency=/home/mcoffin/workspace/zinc/examples/empty/target/thumbv6m-none-eabi/release/deps --cap-lints allow` (exit code: 101)
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

1 participant