-
Notifications
You must be signed in to change notification settings - Fork 336
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
Re-enable clippy rule field_reassign_with_default #685
Comments
The fix in clippy landed after Jan 3rd when 1.50.0 was tagged. So it will be shipped in 1.51.0. I wonder to what degree this is a pain for contract developers because both Rust 1.49.0 and 1.50.0 are affected by the problem now and 1.50.0 is the min version for CosmWasm 0.14 development. |
Can reproduce the problem with Rust 1.50.0 in this repo as well as cosmwasm-examples. Current Rust beta (1.51.0) fixes it. We should make Rust 1.51.0 the min supported version for CosmWasm 0.14 to ensure contract developers do not run into this problem. |
I don't think it's so impactful: It's a linter warning, it's clearly a bug, and it's easy to silence. I agree we should move to Rust 1.51.0 asap, though. |
Yeah, but it is a serious support issue. The error message from the linter is not that helpful and we can't assume contract developers understand the source issue and identify it as a linter bug. |
This can be resolved by using schemars 0.8.1: https://github.com/GREsau/schemars/releases/tag/v0.8.1 |
field_reassign_with_default was enabled with Rust 1.49.0 and does not play well with auto-generated code from schemars. See
In order to allow developing with Rust 1.49.0, we added a few
#![allow(clippy::field_reassign_with_default)]
. Those should be removed when there is a schemars patch.For contract developers it is recommended to use Rust stable 1.47.0 or 1.48.0 in order to avoid running into this problem again and again across different repos.
The text was updated successfully, but these errors were encountered: