Restructure frame_benchmarking macro related exports#14787
Restructure frame_benchmarking macro related exports#14787paritytech-processbot[bot] merged 51 commits intomasterfrom
frame_benchmarking macro related exports#14787Conversation
…o-related-exports
Co-authored-by: Bastian Köcher <git@kchr.de>
…o-related-exports
|
@juangirini Unknown command "rebaes"; Available ones are bench-all, bench-bm, bench-overhead, bench, fmt, merge, rebase, sample, try-runtime, update-ui. Refer to help docs and/or source code. |
|
bot rebase |
…orts' into jg/restructure-benchmarking-macro-related-exports
|
Rebased |
liamaharon
left a comment
There was a problem hiding this comment.
Looking good, just not sure if a stderr log needs to be adjusted.
| help: consider importing one of these items | ||
| | | ||
| 1 + use frame_benchmarking::__private::traits::PalletInfo; |
There was a problem hiding this comment.
Shouldn't this suggest
| help: consider importing one of these items | |
| | | |
| 1 + use frame_benchmarking::__private::traits::PalletInfo; | |
| help: consider importing one of these items | |
| | | |
| 1 + use frame_support::traits::PalletInfo; |
There was a problem hiding this comment.
Interesting, do you know if it is possible to somehow tell the compiler to ignore that option?
| //! Benchmarking setup for pallet-template | ||
| #![cfg(feature = "runtime-benchmarks")] | ||
| use super::*; | ||
| use sp_std::vec; |
There was a problem hiding this comment.
This looks wrong? I don't see any usage of the macro in here. Maybe some macro needs this? If yes, it should pull this in automatically.
There was a problem hiding this comment.
It is expected here https://gitlab.parity.io/parity/mirrors/substrate/-/jobs/3434676
[2023-08-24 12:21:48] error: cannot find macro `vec` in this scope
[2023-08-24 12:21:48] --> /builds/parity/mirrors/substrate/bin/node-template/pallets/template/src/benchmarking.rs:10:1
[2023-08-24 12:21:48] |
[2023-08-24 12:21:48] 10 | #[benchmarks]
[2023-08-24 12:21:48] | ^^^^^^^^^^^^^
[2023-08-24 12:21:48] |
[2023-08-24 12:21:48] = help: consider importing one of these items:
[2023-08-24 12:21:48] crate::benchmarking::__private::vec
[2023-08-24 12:21:48] frame_benchmarking::__private::vec
[2023-08-24 12:21:48] scale_info::prelude::vec
[2023-08-24 12:21:48] sp_std::vec
[2023-08-24 12:21:48] = note: this error originates in the attribute macro `benchmarks` (in Nightly builds, run with -Z macro-backtrace for more info)
| traits::{AppVerify, Hash}, | ||
| RuntimeAppPublic, | ||
| }; | ||
| use sp_std::{vec, vec::Vec}; |
There was a problem hiding this comment.
It is actually required https://gitlab.parity.io/parity/mirrors/substrate/-/jobs/3434492
[2023-08-24 12:02:10] error: cannot find macro `vec` in this scope
[2023-08-24 12:02:10] --> /builds/parity/mirrors/substrate/frame/benchmarking/src/baseline.rs:93:14
[2023-08-24 12:02:10] |
[2023-08-24 12:02:10] 93 | let msg = vec![j, j];
[2023-08-24 12:02:10] | ^^^
[2023-08-24 12:02:10] |
[2023-08-24 12:02:10] = help: consider importing one of these items:
[2023-08-24 12:02:10] crate::__private::vec
[2023-08-24 12:02:10] scale_info::prelude::vec
[2023-08-24 12:02:10] sp_api::vec
[2023-08-24 12:02:10] sp_std::vec
[2023-08-24 12:02:10]
[2023-08-24 12:02:10] error[E0412]: cannot find type `Vec` in this scope
[2023-08-24 12:02:10] --> /builds/parity/mirrors/substrate/frame/benchmarking/src/baseline.rs:92:21
[2023-08-24 12:02:10] |
[2023-08-24 12:02:10] 92 | let msg_and_sigs: Vec<_> = (0..sigs_count).map(|j| {
[2023-08-24 12:02:10] | ^^^ not found in this scope
[2023-08-24 12:02:10] |
[2023-08-24 12:02:10] help: consider importing one of these items
[2023-08-24 12:02:10] |
[2023-08-24 12:02:10] 23 + use crate::__private::Vec;
[2023-08-24 12:02:10] |
[2023-08-24 12:02:10] 23 + use frame_support::dispatch::Vec;
[2023-08-24 12:02:10] |
[2023-08-24 12:02:10] 23 + use scale_info::prelude::vec::Vec;
[2023-08-24 12:02:10] |
[2023-08-24 12:02:10] 23 + use sp_api::vec::Vec;
[2023-08-24 12:02:10] |
[2023-08-24 12:02:10] and 2 other candidates
|
bot merge |
Partial for paritytech/polkadot-sdk#172