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

thread 'main' panicked at 'librustc_metadata\creader.rs:546: proc-macro crate not dylib', librustc\util\bug.rs:47:26 #55814

Closed
Lokathor opened this issue Nov 9, 2018 · 3 comments

Comments

@Lokathor
Copy link
Contributor

Lokathor commented Nov 9, 2018

D:\dev\gba>cargo check
   Compiling proc-macro2 v0.4.21
    Checking unicode-xid v0.1.0
    Checking quote v0.6.10
    Checking syn v0.15.18
    Checking gba-proc-macro v0.1.0
    Checking gba v0.0.1 (D:\dev\gba)
thread 'main' panicked at 'librustc_metadata\creader.rs:546: proc-macro crate not dylib', librustc\util\bug.rs:47:26
note: Run with `RUST_BACKTRACE=1` for a backtrace.

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

note: rustc 1.31.0-nightly (3e6f30ec3 2018-10-26) running on x86_64-pc-windows-msvc

note: compiler flags: -C debuginfo=2 -C incremental --crate-type lib

note: some of the compiler flags provided by cargo are hidden

error: Could not compile `gba`.

To learn more, run the command again with --verbose.

I made a commit of the exact state of my repo when it happened: rust-console/gba@4c99082

@ehuss
Copy link
Contributor

ehuss commented Nov 9, 2018

In gba-proc-macro, you need to set proc-macro = true in the [lib] section instead of setting the crate-type. A few days ago I posted rust-lang/cargo#6256 to avoid this particular footgun, but it might be a bit before it hits nightly.

As for the panic, I'm unsure if there's anything that needs to be done there. Cargo was kinda doing the wrong thing, but I'm not sure it deserves a panic.

@Lokathor
Copy link
Contributor Author

seems to have solved it.

@Lokathor
Copy link
Contributor Author

Since that PR merged, I think we can close this issue

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

No branches or pull requests

2 participants