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

clippy: found invalid metadata files for crate #353

Closed
brianmay opened this issue Jul 6, 2023 · 2 comments
Closed

clippy: found invalid metadata files for crate #353

brianmay opened this issue Jul 6, 2023 · 2 comments

Comments

@brianmay
Copy link

brianmay commented Jul 6, 2023

When building https://github.com/electronicarts/helmci/tree/use_crane:

(note this is somewhat simpler then my other project...)

$ nix build
error: builder for '/nix/store/p1issv8v1vgq3nyn9p88lnlxlyqmaimr-helmci-clippy-0.2.1.drv' failed with exit code 101;
       last 10 log lines:
       >    |     |
       >    |     `async` because of this
       >    |
       >    = note: `async` trait functions are not currently supported
       >    = note: consider using the `async-trait` crate: https://crates.io/crates/async-trait
       >    = note: see issue #91611 <https://github.com/rust-lang/rust/issues/91611> for more information
       >
       > Some errors have detailed explanations: E0432, E0659, E0706, E0786.
       > For more information about an error, try `rustc --explain E0432`.
       > error: could not compile `helmci` (bin "helmci") due to 287 previous errors
       For full logs, run 'nix log /nix/store/p1issv8v1vgq3nyn9p88lnlxlyqmaimr-helmci-clippy-0.2.1.drv'.
error: 1 dependencies of derivation '/nix/store/l98gjrklh9p5gbw5lqgwbizb5la9da5m-helmci-0.2.1.drv' failed to build
error: 1 dependencies of derivation '/nix/store/467vbqp9z57hca1hyski34arbgzivxqb-helmci.drv' failed to build
error: 1 dependencies of derivation '/nix/store/r1s630k2d5wxr6hf4xw26m1w0ak0vjlg-helmci-all.drv' failed to build

$ nix log /nix/store/p1issv8v1vgq3nyn9p88lnlxlyqmaimr-helmci-clippy-0.2.1.drv
++ command cargo clippy --release -- --deny warnings
    Checking helmci v0.2.1 (/build/9031cpfwbcj2phv794zg9p143qnc50ad-source)
error[E0786]: found invalid metadata files for crate `lazy_static`
  --> src/main.rs:12:1
   |
12 | extern crate lazy_static;
   | ^^^^^^^^^^^^^^^^^^^^^^^^^
   |
   = note: invalid metadata version found: /nix/store/cdlwl5giil1d8hfracs3aj27cn3rwvml-helmci-deps-0.2.1/target/release
/deps/liblazy_static-1486a16f21b29258.rmeta

error[E0786]: found invalid metadata files for crate `anyhow`
  --> src/main.rs:21:5
   |
21 | use anyhow::{anyhow, Context};
   |     ^^^^^^
   |
   = note: invalid metadata version found: /nix/store/cdlwl5giil1d8hfracs3aj27cn3rwvml-helmci-deps-0.2.1/target/release
/deps/libanyhow-b48395a7ddb26e46.rmeta

error[E0786]: found invalid metadata files for crate `clap`
  --> src/main.rs:23:5
   |
23 | use clap::Parser;
   |     ^^^^
   |
   = note: invalid metadata version found: /nix/store/cdlwl5giil1d8hfracs3aj27cn3rwvml-helmci-deps-0.2.1/target/release
/deps/libclap-f5dbb9eb74fbd65d.rmeta
[....]

If I bypass the clippy checks, it works fine.

@brianmay brianmay changed the title found invalid metadata files for crate clippy: found invalid metadata files for crate Jul 6, 2023
@ipetkov
Copy link
Owner

ipetkov commented Jul 6, 2023

I think the problem here is mixing rustc and clippy versions (the former from rust-overlay and the latter from nixpkgs)

Try using overrideToolchain instead of overrideScope' directly (it will handle overriding clippy, and rustc, and cargo, etc)

brianmay pushed a commit to electronicarts/helmci that referenced this issue Jul 6, 2023
@brianmay
Copy link
Author

brianmay commented Jul 6, 2023

That looks better, thanks.

Closing.

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