-
Notifications
You must be signed in to change notification settings - Fork 127
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
Cargo build produces several warning if used with recent toolchain #1048
Comments
If they are unused shouldn't they be removed? |
what should be removed? |
so you get this among other warnings, is
|
I get it using rustc 1.78, but I don't get it using rustc 1.75. |
yep cause before 1.75 were enforced by the toml file. Now that is not anymore enforced otherwise we get incompatibility with some editors, we need to specify the version in the script that runs fmt and clippy. Would be also nice to specify it somewhere where new contributors can see it very well I don't want them to waste time in solving "future" clippy error. |
does this mean the default toolchain MSRV should be set to 1.75? |
that means that it was, but we removed it cause it was creating issue with some text editors. |
The stratum project should work with any toolchain equal or above 1.75. All the warnings we are seeing should probably be addressed in a PR. |
this will make CI more complicated. We will need to:
It will make also development experience worst, since you will need to run cargo clippy with whatever is rust last on CI. But I'm not opposed to it. Both approaches are valid: (1) run everything with MSRV and (2) only compile with MSRV and run checks with last. |
You are right that we should check MSRV, and it was added before removing the tool-chain pining https://github.com/stratum-mining/stratum/actions/workflows/rust-msrv.yaml. Currently it only checks build process, but I guess we should run everything(ie testing as well) with latest toolchain version and with MSRV. I agree also that we should handle those warnings. currently it is kinda annoying. PRs are more than welcome (: |
Another note, we are currently running |
Fmt must be runned on Nightly, not sure about clippy |
@Fi3 why? I think you can run |
cause we use a feature that work only on nightly I don't remeber whcih one but if you try to run it you will see |
here you are:
|
I have toolchain with rustc 1.78
If I compile
protocols
crate I get the following warningsPossibly also other crates in the stack are affected. I think that this arose after the removal of rust-version field from crates
#981
We should specify the toolchain every time that is called cargo build or cargo clippy
cargo +1.75 build
or set some sort of override, like setting the
RUSTUP_TOOLCHAIN
env variable. This has to be done in every script (like in/scripts/clippy-on-all-workspaces.sh
or those that triggers MG tests, like this one. I am not practical with the issue, so perhaps there is a better solution.The text was updated successfully, but these errors were encountered: