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

Warning from running nightly clippy on default repo #179

Open
Yung-Beef opened this issue Sep 12, 2024 · 6 comments
Open

Warning from running nightly clippy on default repo #179

Yung-Beef opened this issue Sep 12, 2024 · 6 comments

Comments

@Yung-Beef
Copy link

Per the 1.1 setup page there should be no warnings or errors from running cargo +nightly clippy however I am getting:

warning: unreachable pattern
  --> src/lib.rs:29:12
   |
29 |     #[pallet::call]
   |               ^^^^ matches no values because `polkadot_sdk_frame::deps::frame_support::Never` is uninhabited
   |
   = note: to learn more about uninhabited types, see https://doc.rust-lang.org/nomicon/exotic-sizes.html#empty-types
   = note: `#[warn(unreachable_patterns)]` on by default

warning: `pallet-kitties` (lib) generated 1 warning
@shawntabrizi
Copy link
Owner

interesting... will look

@shawntabrizi
Copy link
Owner

shawntabrizi commented Sep 12, 2024

Everything passes for me:

Output from my "check" script
substrate-collectables-workshop git:(master) ./check.sh
Skipping directory (no Cargo.toml found): steps/0/
Entering directory: steps/1/
Checking cargo fmt
Checking cargo clippy
    Finished `dev` profile [unoptimized + debuginfo] target(s) in 0.25s
Checking cargo test
    Finished `test` profile [unoptimized + debuginfo] target(s) in 0.20s
     Running unittests src/lib.rs (target/debug/deps/pallet_kitties-cbea56a5091ea01d)

running 0 tests

test result: ok. 0 passed; 0 failed; 0 ignored; 0 measured; 0 filtered out; finished in 0.00s

   Doc-tests pallet_kitties

running 0 tests

test result: ok. 0 passed; 0 failed; 0 ignored; 0 measured; 0 filtered out; finished in 0.00s

Entering directory: steps/2/
Checking cargo fmt
Checking cargo clippy
    Finished `dev` profile [unoptimized + debuginfo] target(s) in 0.17s
Checking cargo test
    Finished `test` profile [unoptimized + debuginfo] target(s) in 0.19s
     Running unittests src/lib.rs (target/debug/deps/pallet_kitties-cbea56a5091ea01d)

running 0 tests

test result: ok. 0 passed; 0 failed; 0 ignored; 0 measured; 0 filtered out; finished in 0.00s

   Doc-tests pallet_kitties

running 0 tests

test result: ok. 0 passed; 0 failed; 0 ignored; 0 measured; 0 filtered out; finished in 0.00s

Entering directory: steps/3/
Checking cargo fmt
Checking cargo clippy
    Finished `dev` profile [unoptimized + debuginfo] target(s) in 0.18s
Checking cargo test
    Finished `test` profile [unoptimized + debuginfo] target(s) in 0.19s
     Running unittests src/lib.rs (target/debug/deps/pallet_kitties-cbea56a5091ea01d)

running 0 tests

test result: ok. 0 passed; 0 failed; 0 ignored; 0 measured; 0 filtered out; finished in 0.00s

   Doc-tests pallet_kitties

running 0 tests

test result: ok. 0 passed; 0 failed; 0 ignored; 0 measured; 0 filtered out; finished in 0.00s

Entering directory: steps/4/
Checking cargo fmt
Checking cargo clippy
    Finished `dev` profile [unoptimized + debuginfo] target(s) in 0.18s
Checking cargo test
    Finished `test` profile [unoptimized + debuginfo] target(s) in 0.19s
     Running unittests src/lib.rs (target/debug/deps/pallet_kitties-cbea56a5091ea01d)

running 0 tests

test result: ok. 0 passed; 0 failed; 0 ignored; 0 measured; 0 filtered out; finished in 0.00s

   Doc-tests pallet_kitties

Let's share versions?

➜  substrate-collectables-workshop git:(master) cargo +nightly clippy --version
clippy 0.1.82 (176e5452 2024-08-04)
➜  substrate-collectables-workshop git:(master) cargo clippy --version 
clippy 0.1.80 (05147895 2024-07-21)

@Yung-Beef
Copy link
Author

Yung-Beef commented Sep 12, 2024

No idea about a check script but here's what I get for those 2 commands

➜  substrate-collectables-workshop git:(master) cargo +nightly clippy --version
clippy 0.1.82 (8d6b88b 2024-09-11)
➜  substrate-collectables-workshop git:(master) cargo clippy --version 
clippy 0.1.81 (eeb90cd 2024-09-04)

@Yung-Beef
Copy link
Author

Yung-Beef commented Sep 12, 2024

I'm running it after
git clone https://github.com/shawntabrizi/substrate-collectables-workshop/ -b starting-template --single-branch
per the setup page, so I don't have the script or the steps folder.

@shawntabrizi
Copy link
Owner

@Yung-Beef okay i can reproduce. let me see what i can do, the error is coming from Polkadot SDK unfortunately

@shawntabrizi
Copy link
Owner

For now, please feel free to move on. I will try to get it fixed:

paritytech/polkadot-sdk#5697

Thanks for the report.

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