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

Fixes warnings in frame-support-procedural crate #4915

Merged
merged 5 commits into from
Jul 3, 2024

Conversation

gupnik
Copy link
Contributor

@gupnik gupnik commented Jul 1, 2024

This PR fixes the unused warnings in frame-support-procedural crate, raised by the latest stable rust release.

@gupnik gupnik added R0-silent Changes should not be mentioned in any release notes T1-FRAME This PR/Issue is related to core FRAME, the framework. labels Jul 1, 2024
@gupnik gupnik requested a review from a team as a code owner July 1, 2024 04:51
@paritytech-cicd-pr
Copy link

The CI pipeline was cancelled due to failure one of the required jobs.
Job name: cargo-clippy
Logs: https://gitlab.parity.io/parity/mirrors/polkadot-sdk/-/jobs/6592216

@paritytech-review-bot paritytech-review-bot bot requested a review from a team July 1, 2024 10:58
@paritytech-review-bot paritytech-review-bot bot requested a review from a team July 2, 2024 06:44
@ggwpez
Copy link
Member

ggwpez commented Jul 2, 2024

Some description please to describe what this addresses, as i have no context on the change.

@bkchr
Copy link
Member

bkchr commented Jul 2, 2024

Some description please to describe what this addresses, as i have no context on the change.

As the title says, it fixes some unused warnings coming with a newer stable.

Copy link
Contributor

@kianenigma kianenigma left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Code looks good, but I want to further ask you to also semantically double check all the unused fields.

I worry that in the process where we made all of this unused, we have had some regression. Does all the code here, in terms of each macro's abilities, make sense to you?

For example, I see where being removed from construct_runtime. I remember this one, and it makes sense. But I cannot validate all the changes here.

Put differently, was everything that was previously unused, unused for a good reason?

@gupnik
Copy link
Contributor Author

gupnik commented Jul 3, 2024

Thanks for the review.

Put differently, was everything that was previously unused, unused for a good reason?

Yes, all of these fields previously followed a standard API across all pallet components and it seems that the compiler was not smart enough to realise that some of those are not needed for specific components. With the latest stable, it was able to detect and raise it.

@gupnik gupnik enabled auto-merge July 3, 2024 10:38
@gupnik gupnik added this pull request to the merge queue Jul 3, 2024
Merged via the queue into master with commit e5791a5 Jul 3, 2024
153 of 157 checks passed
@gupnik gupnik deleted the gupnik/frame-support-proc-warnings branch July 3, 2024 11:55
@kianenigma
Copy link
Contributor

@paritytech-cicd-pr can we update the rust version in CI now? what is the process/owner for that?

TomaszWaszczyk pushed a commit to TomaszWaszczyk/polkadot-sdk that referenced this pull request Jul 7, 2024
This PR fixes the unused warnings in `frame-support-procedural` crate,
raised by the latest stable rust release.
TarekkMA pushed a commit to moonbeam-foundation/polkadot-sdk that referenced this pull request Aug 2, 2024
This PR fixes the unused warnings in `frame-support-procedural` crate,
raised by the latest stable rust release.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
R0-silent Changes should not be mentioned in any release notes T1-FRAME This PR/Issue is related to core FRAME, the framework.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants