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

Unexpected message: "WARN rustc_metadata::locator no metadata found: incompatible metadata version found:" #91963

Closed
dalance opened this issue Dec 15, 2021 · 3 comments
Labels
C-bug Category: This is a bug. regression-untriaged Untriaged performance or correctness regression.

Comments

@dalance
Copy link
Contributor

dalance commented Dec 15, 2021

Code

I tried this code:

use thiserror::Error;

#[derive(Error, Debug)]
pub enum Error {
    #[error("error")]
    Error,
}

fn main() {
    let err = Error::Error;
    dbg!(err);
}

with this Cargo.toml

[package]
name = "test"
version = "0.1.0"
edition = "2018"

# See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html

[dependencies]
thiserror = "1.0.30"

I expected to see this happen:

$ cargo clean && cargo +1.40.0 run && touch src/lib.rs && cargo +1.57.0 run
   Compiling proc-macro2 v1.0.34
   Compiling unicode-xid v0.2.2
   Compiling syn v1.0.82
   Compiling quote v1.0.10
   Compiling thiserror-impl v1.0.30
   Compiling thiserror v1.0.30
   Compiling test v0.1.0 (/home/hatta/work/repos/playground/test62)
    Finished dev [unoptimized + debuginfo] target(s) in 7.30s
     Running `target/debug/test`
[src/main.rs:11] err = Error
  13.10s user 1.63s system 200% cpu 7.336 total
   Compiling proc-macro2 v1.0.34
   Compiling unicode-xid v0.2.2
   Compiling syn v1.0.82
   Compiling quote v1.0.10
   Compiling thiserror-impl v1.0.30
   Compiling thiserror v1.0.30
   Compiling test v0.1.0 (/home/hatta/work/repos/playground/test62)
    Finished dev [unoptimized + debuginfo] target(s) in 6.34s
     Running `target/debug/test`
[src/main.rs:11] err = Error

Instead, this happened:

$ cargo clean && cargo +1.40.0 run && touch src/lib.rs && cargo +1.57.0 run
   Compiling proc-macro2 v1.0.34
   Compiling unicode-xid v0.2.2
   Compiling syn v1.0.82
   Compiling quote v1.0.10
   Compiling thiserror-impl v1.0.30
   Compiling thiserror v1.0.30
   Compiling test v0.1.0 (/home/hatta/work/repos/playground/test62)
    Finished dev [unoptimized + debuginfo] target(s) in 7.30s
     Running `target/debug/test`
[src/main.rs:11] err = Error
  13.10s user 1.63s system 200% cpu 7.336 total
   Compiling proc-macro2 v1.0.34
   Compiling unicode-xid v0.2.2
   Compiling syn v1.0.82
   Compiling quote v1.0.10
   Compiling thiserror-impl v1.0.30
   Compiling thiserror v1.0.30
   Compiling test v0.1.0 (/home/hatta/work/repos/playground/test62)
WARN rustc_metadata::locator no metadata found: incompatible metadata version found: '/home/hatta/work/repos/playground/test62/target/debug/deps/libthiserror_impl-fb3604e0cefc2e39.so'
    Finished dev [unoptimized + debuginfo] target(s) in 6.34s
     Running `target/debug/test`
[src/main.rs:11] err = Error

The unexpected message "WARN rustc_metadata::locator no metadata found: incompatible metadata version found:" is shown.

Version it worked on

It most recently worked on: Rust 1.56

$ cargo clean && cargo +1.40.0 run && touch src/lib.rs && cargo +1.56.0 run
   Compiling proc-macro2 v1.0.34
   Compiling unicode-xid v0.2.2
   Compiling syn v1.0.82
   Compiling quote v1.0.10
   Compiling thiserror-impl v1.0.30
   Compiling thiserror v1.0.30
   Compiling test v0.1.0 (/home/hatta/work/repos/playground/test62)
    Finished dev [unoptimized + debuginfo] target(s) in 7.95s
     Running `target/debug/test`
[src/main.rs:11] err = Error
  14.01s user 2.04s system 201% cpu 7.979 total
   Compiling proc-macro2 v1.0.34
   Compiling unicode-xid v0.2.2
   Compiling syn v1.0.82
   Compiling quote v1.0.10
   Compiling thiserror-impl v1.0.30
   Compiling thiserror v1.0.30
   Compiling test v0.1.0 (/home/hatta/work/repos/playground/test62)
    Finished dev [unoptimized + debuginfo] target(s) in 6.81s
     Running `target/debug/test`
[src/main.rs:11] err = Error

Version with regression

rustc --version --verbose:

rustc 1.57.0 (f1edd0429 2021-11-29)
binary: rustc
commit-hash: f1edd0429582dd29cccacaf50fd134b05593bd9c
commit-date: 2021-11-29
host: x86_64-unknown-linux-gnu
release: 1.57.0
LLVM version: 13.0.0

Backtrace

Backtrace

<backtrace>

@dalance dalance added C-bug Category: This is a bug. regression-untriaged Untriaged performance or correctness regression. labels Dec 15, 2021
@rustbot rustbot added I-prioritize Issue: Indicates that prioritization has been requested for this issue. regression-from-stable-to-{channel} and removed regression-untriaged Untriaged performance or correctness regression. labels Dec 15, 2021
@dalance
Copy link
Contributor Author

dalance commented Dec 15, 2021

This may be related to #91935, but this is not ICE.

@Mark-Simulacrum Mark-Simulacrum added regression-untriaged Untriaged performance or correctness regression. and removed regression-from-stable-to-{channel} labels Dec 15, 2021
@ehuss
Copy link
Contributor

ehuss commented Dec 15, 2021

Thanks for the report!

This has been fixed in 1.58 via #90544. I'm going to close as fixed as this only affects 1.57. @Mark-Simulacrum please reopen if you want this considered for a point release, otherwise I don't think there is much we can do.

@ehuss ehuss closed this as completed Dec 15, 2021
@rustbot rustbot removed the I-prioritize Issue: Indicates that prioritization has been requested for this issue. label Dec 15, 2021
@Mark-Simulacrum
Copy link
Member

Yeah, that seems like the right thing. I'm not inclined to try to push out a point release right now.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
C-bug Category: This is a bug. regression-untriaged Untriaged performance or correctness regression.
Projects
None yet
Development

No branches or pull requests

4 participants