ICE when proc-macro crate and non proc-macro crate share Cargo project #50640
Copy link
Copy link
Closed
rust-lang/cargo
#5520Labels
A-decl-macros-2-0Area: Declarative macros 2.0 (#39412)Area: Declarative macros 2.0 (#39412)C-bugCategory: This is a bug.Category: This is a bug.I-ICEIssue: The compiler panicked, giving an Internal Compilation Error (ICE) ❄️Issue: The compiler panicked, giving an Internal Compilation Error (ICE) ❄️regression-from-stable-to-nightlyPerformance or correctness regression from stable to nightly.Performance or correctness regression from stable to nightly.
Milestone
Description
Activity
A bisect points at #50345 as the cause of the regression, which is a rollup. The only thing that might make sense in there is the cargo update. cc @alexcrichton
- addedI-ICEIssue: The compiler panicked, giving an Internal Compilation Error (ICE) ❄️Issue: The compiler panicked, giving an Internal Compilation Error (ICE) ❄️A-decl-macros-2-0Area: Declarative macros 2.0 (#39412)Area: Declarative macros 2.0 (#39412)C-bugCategory: This is a bug.Category: This is a bug.
on May 11, 2018 Yep looks like a Cargo regression, looking into it
- addedregression-from-stable-to-betaPerformance or correctness regression from stable to beta.Performance or correctness regression from stable to beta.
on May 11, 2018 - added a commit that references this issue
on May 11, 2018 I believe this should be fixed in rust-lang/cargo#5520
- added 2 commits that reference this issue
on May 11, 2018 4 remaining items
This is still an issue in
2018-05-15when runningcargo check.- addedregression-from-stable-to-nightlyPerformance or correctness regression from stable to nightly.Performance or correctness regression from stable to nightly.and removedregression-from-stable-to-betaPerformance or correctness regression from stable to beta.Performance or correctness regression from stable to beta.
on May 16, 2018 @SergioBenitez the issue is fixed in cargo, and cargo was updated in beta. The PR updating it in nightly (#50696) is not merged yet.
- added a commit that references this issue
on May 16, 2018
Metadata
Metadata
Assignees
Labels
A-decl-macros-2-0Area: Declarative macros 2.0 (#39412)Area: Declarative macros 2.0 (#39412)C-bugCategory: This is a bug.Category: This is a bug.I-ICEIssue: The compiler panicked, giving an Internal Compilation Error (ICE) ❄️Issue: The compiler panicked, giving an Internal Compilation Error (ICE) ❄️regression-from-stable-to-nightlyPerformance or correctness regression from stable to nightly.Performance or correctness regression from stable to nightly.
This is a regression introduced in a recent nightly.
When a lib and a bin are declared in the same Cargo project, where the lib is of type
proc-macro,rustcexperiences an ICE with a message ofthread 'main' panicked at 'librustc_metadata/creader.rs:520: proc-macro crate not dylib', librustc/session/mod.rs:1281:26. This error does not occur when the proc-macro lib and the bin are split into independent Cargo projects. Running withCARGO_INCREMENTAL=0does not change the outcome.Cargo.tomllooks as follows:src/lib.rslooks as follows:src/main.rslooks as follows:The full error log:
Details