-
Notifications
You must be signed in to change notification settings - Fork 721
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
undetected unused variables in frame benchmarking V1 #6078
Comments
@kianenigma removal of this footgun is needed? |
We would first need to understand what is the disparity between v1 and v2 syntax that is causing this. Then, yes, fixing it is needed. |
In the V2 syntax we actually expand these code of blocks into proper functions. We end up not using those functions, but they are annotated with the same spans as the original code, getting us proper clippy warning support. I dont remember how it works in the V1 code, but i think "unused warnings" are normally ignored in macro expanded code, so that could be it. |
Locating the issue while porting more pallets to V2 seems like two birds one long weekend :) but could then see which pallets generate the warning? |
The tracking issue for moving them is here: #6202
Yes. |
Merging of #6018 made some unused variable imports to appear in the code. I first thought @re-gius had some mistake, but it is not the case. Looking at the old benchmarking code, it seems like some variables are indeed unused, and it goes undetected in the v1 benchmarking macro.
In the v2 macro, it gets detected though.
Example:
call_hash
andmulti_account_id
here:polkadot-sdk/substrate/frame/multisig/src/benchmarking.rs
Lines 51 to 70 in 7c2d349
The text was updated successfully, but these errors were encountered: