-
Notifications
You must be signed in to change notification settings - Fork 43
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
Disallow build warnings for Rust #4703
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Note that rust warns if a crate has breaking changes in a future version of Rust, even if that future version is not being used. That means that code that compiles with no warnings one day can issue warnings the next.
It is nice to get rid of warnings and the cleanup is legitimate and appreciated, but be aware that with this flag set you may get CI breaking suddenly without warning if you do this.... which is why it is not done yet. It's up to you.
Yes, I have had sealed docker builds, meant to produce the same artefacts for the next 20 years, break suddenly because of this :-D One needs to pull out the network cable, so to speak.
Thanks for the heads up! I'll have to think about this. Is it not possible to disable that behavior? |
Looks like there is a way to disable it: So the decision is whether we value not having warnings or knowing about future breakages. |
Yes, as linked, and as you found. :-) IMO it would have been better if they had made it possible to make that an |
f95e909
to
151487d
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Rubber stamp, thanks!
Motivation
Build warnings are distracting and confusing.
There is one type of build warning that can start appearing without any changes in the code: future incompatibility.
When there is a breaking change in a future version of a dependency, this will start causing build warnings without changes in the repository. We need to disable these warning in order to safely disallow any build warnings in Rust and prevent the introduction of new warnings.
Changes
RUSTFLAGS="-D warnings"
in front ofcargo test
in CI to disallow build warning.config.toml
file.use candid::types::number;
fromrs/backend/src/accounts_store/schema/proxy/tests.rs
.schema_label
fromrs/backend/src/state/partitions.rs
Tests
CI passes
Todos