-
Notifications
You must be signed in to change notification settings - Fork 12.9k
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
error: internal compiler error: unexpected panic: Failed to get crate data for crate21 #85386
Comments
This issue only occurs when compiling to |
@rustbot ping cleanup |
Hey Cleanup Crew ICE-breakers! This bug has been identified as a good cc @AminArria @camelid @chrissimpkins @contrun @DutchGhost @elshize @h-michael @HallerPatrick @hdhoang @hellow554 @henryboisdequin @imtsuki @JamesPatrickGill @kanru @KarlK90 @LeSeulArtichaut @MAdrianMattocks @matheus-consoli @mental32 @nmccarty @Noah-Kennedy @pard68 @PeytonT @pierreN @Redblueflame @RobbieClarken @RobertoSnap @robjtede @SarthakSingh31 @shekohex @sinato @smmalis37 @steffahn @Stupremee @tamuhey @turboladen @woshilapin @yerke |
@jonas-schievink I started a bisect today and can confirm the issue existed for at least 3 months, but could not got further back because we use some newer rust features I have to replace, please let me know if I can help with anything (I'll try to work on a "minimal" code sample) |
I did some initial code reduction that lives in the
This is indeed peculiar, reduced the falty code to: use proc_macro::TokenStream;
#[proc_macro_derive(ToDiscriminant)]
pub fn derive_discriminant(_: TokenStream) -> TokenStream {
TokenStream::new()
}
#[proc_macro_derive(TransitiveChild)]
pub fn derive_transitive_child(_: TokenStream) -> TokenStream {
TokenStream::new()
} editor/src/lib.rs pub use proc_macros::{ToDiscriminant, TransitiveChild}; This causes the error when executing |
That's interesting, so this bug existed since 2019? Something must have changed that made it show up much more often then. |
Not sure how to handle this further so I'll defer to the prioritization folks |
Things get even weirder: while trying to bisect older versions, I added Backtrace
|
It seems like I ran into #56935 when adding the explicit |
This issue was indeed fixed by applying the |
Nominating to discussion during T-compiler meeting to try to understand if this specific to the target and perhaps summon someone more familiar with it I think the reduction by @TrueDoctor (thanks!) is great to isolate the issue, so removing the ICE-breaker label @rustbot label +I-nominated -ICEBreaker-Cleanup-Crew |
issue has been discussed during the compile meeting (Zulip log) |
I discussed this with @alexcrichton . They confirmed that it looks like a duplicate of issue #56935. That is: this is not a wasm-specific bug, but rather a bug with cross-compilation in general. As alex put it, "looks like the proc macro is loaded twice by accident. er maybe 3 times even..." (and they were very pleased by the MCVE) |
@pnkfelix Is there anything more I can do? This is my first interaction with
is probably just a side effect of the first one. |
I'll go and close this issue as duplicate, as the discussion demonstrates (this won't block discussing the issue here or on #56935 or Zulip) |
Code
See here.
Meta
rustc --version --verbose
:This bug also persists in beta and nightly:
Error output
On different invokations the
crate20
has also beencrate21
Backtrace
The text was updated successfully, but these errors were encountered: