Skip to content
This repository has been archived by the owner on Nov 15, 2023. It is now read-only.

benchmarking v2 syntax does not issue warnings on unused benchmark params #13303

Closed
Tracked by #380
sam0x17 opened this issue Feb 2, 2023 · 0 comments · Fixed by #13224
Closed
Tracked by #380

benchmarking v2 syntax does not issue warnings on unused benchmark params #13303

sam0x17 opened this issue Feb 2, 2023 · 0 comments · Fixed by #13224
Assignees
Labels
U2-some_time_soon Issue is worth doing soon. Z1-easy Can be fixed primarily by duplicating and adapting code by an intermediate coder

Comments

@sam0x17
Copy link
Contributor

sam0x17 commented Feb 2, 2023

Because of how the benchmark function defs aren't actually real function defs, we don't get nice warnings about unused benchmark parameters that we would get if these were real functions.

ie this should issue a warning about x not being used, but does not:

#[benchmark]
fn my_benchmark(x: Linear<10, 100>) {
    #[block]
    {}
}

This would be fixed if we generate real function definitions, as contemplated in #13224

@sam0x17 sam0x17 added U2-some_time_soon Issue is worth doing soon. Z1-easy Can be fixed primarily by duplicating and adapting code by an intermediate coder labels Feb 2, 2023
@sam0x17 sam0x17 self-assigned this Feb 2, 2023
@github-project-automation github-project-automation bot moved this from Backlog to Done in Runtime / FRAME Feb 22, 2023
@github-project-automation github-project-automation bot moved this from Backlog to Done in Benchmarking and Weights Feb 22, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
U2-some_time_soon Issue is worth doing soon. Z1-easy Can be fixed primarily by duplicating and adapting code by an intermediate coder
Projects
Status: Done
Development

Successfully merging a pull request may close this issue.

1 participant