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

Fix clippy job #179

Closed
bkontur opened this issue Feb 12, 2024 · 5 comments
Closed

Fix clippy job #179

bkontur opened this issue Feb 12, 2024 · 5 comments

Comments

@bkontur
Copy link
Contributor

bkontur commented Feb 12, 2024

Problem

PRs fail on clippy like this:
https://github.com/polkadot-fellows/runtimes/actions/runs/7848328318/job/21419205161?pr=178

...
nightly-x86_64-unknown-linux-gnu installed - rustc 1.78.0-nightly (98aa3624b 2024-02-08)
...


Run cargo +nightly clippy --all-targets --locked -q
error[E0635]: unknown feature `stdsimd`
  --> /home/runner/.cargo/registry/src/index.crates.io-6f17d22bba15001f/ahash-0.7.6/src/lib.rs:33:42
   |
33 | #![cfg_attr(feature = "stdsimd", feature(stdsimd))]

https://github.com/polkadot-fellows/runtimes/actions/runs/7802169559/job/21278967760?pr=137

...
nightly-x86_64-unknown-linux-gnu installed - rustc 1.78.0-nightly (f067fd608 2024-02-05)
...


Run cargo +nightly clippy --all-targets --locked -q
error[E0635]: unknown feature `stdsimd`
  --> /home/runner/.cargo/registry/src/index.crates.io-6f17d22bba15001f/ahash-0.7.7/src/lib.rs:33:42
   |
33 | #![cfg_attr(feature = "stdsimd", feature(stdsimd))]
   |                                          ^^^^^^^

For more information about this error, try `rustc --explain E0635`.

Summary

I tried locally, and nightly 2024-02-11 fails:

cargo +nightly-2024-02-11 clippy --all-targets --locked

but nightly 2024-01-31 works:

cargo +nightly-2024-01-31 clippy --all-targets --locked

So, the February-ish nightly does not work here.
CI uses the latest nightly on every run: https://github.com/polkadot-fellows/runtimes/blob/main/.github/workflows/clippy.yml#L23-L28

Solution?

@ggwpez Oliver has suggested to pin the version. How and when do we decide to bump that nightly version? Anytime when new stable is released? Somebody will just manually update github action here: https://github.com/polkadot-fellows/runtimes/blob/main/.github/workflows/clippy.yml#L23-L28?
Any other solutions?

@bkontur bkontur mentioned this issue Feb 12, 2024
1 task
@bkontur
Copy link
Contributor Author

bkontur commented Feb 12, 2024

@bkchr
after:

cargo update -p ahash:0.7.7

it fails on the others (I will continue later):

    Checking uint v0.9.5
error[E0658]: use of unstable library feature 'stdarch_x86_avx512'
  --> /home/bparity/.cargo/registry/src/index.crates.io-6f17d22bba15001f/curve25519-dalek-4.1.1/src/backend/vector/ifma/field.rs:26:5
   |
26 |     _mm256_madd52lo_epu64(z.into(), x.into(), y.into()).into()
   |     ^^^^^^^^^^^^^^^^^^^^^
   |
   = note: see issue #111137 <https://github.com/rust-lang/rust/issues/111137> for more information
   = help: add `#![feature(stdarch_x86_avx512)]` to the crate attributes to enable
   = note: this compiler was built on 2024-02-10; consider upgrading it if it is out of date

error[E0658]: use of unstable library feature 'stdarch_x86_avx512'
  --> /home/bparity/.cargo/registry/src/index.crates.io-6f17d22bba15001f/curve25519-dalek-4.1.1/src/backend/vector/ifma/field.rs:25:9
   |
25 |     use core::arch::x86_64::_mm256_madd52lo_epu64;
   |         ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
   |
   = note: see issue #111137 <https://github.com/rust-lang/rust/issues/111137> for more information
   = help: add `#![feature(stdarch_x86_avx512)]` to the crate attributes to enable
   = note: this compiler was built on 2024-02-10; consider upgrading it if it is out of date

error[E0658]: use of unstable library feature 'stdarch_x86_avx512'
  --> /home/bparity/.cargo/registry/src/index.crates.io-6f17d22bba15001f/curve25519-dalek-4.1.1/src/backend/vector/ifma/field.rs:34:5
   |
34 |     _mm256_madd52hi_epu64(z.into(), x.into(), y.into()).into()
   |     ^^^^^^^^^^^^^^^^^^^^^
   |
   = note: see issue #111137 <https://github.com/rust-lang/rust/issues/111137> for more information
   = help: add `#![feature(stdarch_x86_avx512)]` to the crate attributes to enable
   = note: this compiler was built on 2024-02-10; consider upgrading it if it is out of date

error[E0658]: use of unstable library feature 'stdarch_x86_avx512'
  --> /home/bparity/.cargo/registry/src/index.crates.io-6f17d22bba15001f/curve25519-dalek-4.1.1/src/backend/vector/ifma/field.rs:33:9
   |
33 |     use core::arch::x86_64::_mm256_madd52hi_epu64;
   |         ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
   |
   = note: see issue #111137 <https://github.com/rust-lang/rust/issues/111137> for more information
   = help: add `#![feature(stdarch_x86_avx512)]` to the crate attributes to enable
   = note: this compiler was built on 2024-02-10; consider upgrading it if it is out of date

error[E0635]: unknown feature `stdsimd`
  --> /home/bparity/.cargo/registry/src/index.crates.io-6f17d22bba15001f/curve25519-dalek-4.1.1/src/lib.rs:13:70
   |
13 | #![cfg_attr(all(curve25519_dalek_backend = "simd", nightly), feature(stdsimd))]
   |                                                                      ^^^^^^^

    Checking impl-serde v0.4.0

@ggwpez
Copy link
Member

ggwpez commented Feb 12, 2024

See paritytech/polkadot-sdk#3269
I think there is nothing else that we can do right now than to pin to 1.77 (nightly-2024-01-31) and wait for dependencies to update.

How and when do we decide to bump that nightly version? Anytime when new stable is released?

Dunno. Its just for Clippy, so not that imporant.

This was referenced Feb 12, 2024
@bkontur
Copy link
Contributor Author

bkontur commented Feb 12, 2024

I created a PR with pinned version to 2024-01-31: #180
And also I created another PR (on the top of that) with unpinning #181 (I hope that auto-rebase feature will do the job here :) )

@bkontur
Copy link
Contributor Author

bkontur commented Feb 13, 2024

clippy is fixed by #177

@bkontur bkontur closed this as completed Feb 13, 2024
@salman01zp
Copy link

How did you guys Fix the CI issue? I happen to have similar issue, it compiles locally but fails on CI job here
https://github.com/webb-tools/tangle/actions/runs/8159634139/job/22304382126?pr=498

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

3 participants