Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ICE in cargo test with CARGO_INCREMENTAL=1 on Cargo #39585

Closed
alexcrichton opened this issue Feb 6, 2017 · 3 comments
Closed

ICE in cargo test with CARGO_INCREMENTAL=1 on Cargo #39585

alexcrichton opened this issue Feb 6, 2017 · 3 comments
Labels
A-incr-comp Area: Incremental compilation I-ICE Issue: The compiler panicked, giving an Internal Compilation Error (ICE) ❄️

Comments

@alexcrichton
Copy link
Member

alexcrichton commented Feb 6, 2017

I've checked out Cargo at rust-lang/cargo@4ce099b and from a clean build directory I get:

$ CARGO_INCREMENTAL=1 cargo +nightly test
...
   Compiling cargo v0.18.0 (file:///home/alex/code/cargo)
   Compiling cargotest v0.1.0 (file:///home/alex/code/cargo/tests/cargotest)
error: failed to remove /home/alex/code/cargo/target/debug/deps/metadata-2a6cfcba5e51f525.metadata.o: No such file or directory (os error 2)

warning: Error finalizing incremental compilation session directory `/home/alex/code/cargo/target/debug/incremental/metadata-2kp13d1pc45a0/s-emvufj4cj6-1f76yqu-working`: No such file or directory (os error 2)

error: internal compiler error: unexpected panic

note: the compiler unexpectedly panicked. this is a bug.

note: we would appreciate a bug report: https://github.com/rust-lang/rust/blob/master/CONTRIBUTING.md#bug-reports

thread 'rustc' panicked at '/buildslave/rust-buildbot/slave/nightly-dist-rustc-linux/build/src/librustc/session/mod.rs:450: Trying to invalidate IncrCompSession `InvalidBecauseOfErrors { session_directory: "/home/alex/code/cargo/target/debug/incremental/metadata-2kp13d1pc45a0/s-emvufj4cj6-1f76yqu-working" }`', /buildslave/rust-buildbot/slave/nightly-dist-rustc-linux/build/src/librustc/session/mod.rs:782
note: Run with `RUST_BACKTRACE=1` for a backtrace.

error: Could not compile `cargo`.
Build failed, waiting for other jobs to finish...
error: build failed

The compiler in use is the current latest nightly, specifically:

$ rustc +nightly -vV
rustc 1.17.0-nightly (ea7a6486a 2017-02-04)
binary: rustc
commit-hash: ea7a6486a26af085862cd7a5596bb69e83d85e12
commit-date: 2017-02-04
host: x86_64-unknown-linux-gnu
release: 1.17.0-nightly
LLVM version: 3.9

@alexcrichton alexcrichton added A-incr-comp Area: Incremental compilation I-ICE Issue: The compiler panicked, giving an Internal Compilation Error (ICE) ❄️ labels Feb 6, 2017
@alexcrichton
Copy link
Member Author

cc @michaelwoerister

@michaelwoerister
Copy link
Member

Thanks for the report!

@Marwes
Copy link
Contributor

Marwes commented Feb 7, 2017

Possible duplicate of #39508 ? Same error and it seems like both fail on testing a file called tests/metadata.rs

frewsxcv added a commit to frewsxcv/rust that referenced this issue Feb 8, 2017
…ata, r=alexcrichton

Choose different name for metadata obj-file to avoid clashes with user-chosen names.

Fixes rust-lang#39585 and probably rust-lang#39508.
Incremental compilation assigns different names to obj-files than regular compilation. If a crate is called "metadata" this can lead to a clash between the root module's obj-file and the obj-file containing crate-metadata. This PR assigns a name to the metadata obj-file that cannot clash with other obj-file because it contains a `.` which is not allowed in a Rust module identifier.

r? @alexcrichton

cc @nikomatsakis
frewsxcv added a commit to frewsxcv/rust that referenced this issue Feb 9, 2017
…ata, r=alexcrichton

Choose different name for metadata obj-file to avoid clashes with user-chosen names.

Fixes rust-lang#39585 and probably rust-lang#39508.
Incremental compilation assigns different names to obj-files than regular compilation. If a crate is called "metadata" this can lead to a clash between the root module's obj-file and the obj-file containing crate-metadata. This PR assigns a name to the metadata obj-file that cannot clash with other obj-file because it contains a `.` which is not allowed in a Rust module identifier.

r? @alexcrichton

cc @nikomatsakis
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
A-incr-comp Area: Incremental compilation I-ICE Issue: The compiler panicked, giving an Internal Compilation Error (ICE) ❄️
Projects
None yet
Development

No branches or pull requests

3 participants