When I add and run a new benchmark via
cargo test --package pallet-<name> --features runtime-benchmarks
I get an error which is unclear and unrelated to the actual benchmark i added:
error: recursion limit reached while expanding `stringify!`
--> frame/assets/src/benchmarking.rs:154:1
|
154 | / benchmarks_instance_pallet! {
155 | | create {
156 | | let caller: T::AccountId = whitelisted_caller();
157 | | let caller_lookup = T::Lookup::unlookup(caller.clone());
... |
485 | | impl_benchmark_test_suite!(Assets, crate::mock::new_test_ext(), crate::mock::Test)
486 | | }
| |_^
|
= help: consider increasing the recursion limit by adding a `#![recursion_limit = "256"]` attribute to your crate (`pallet_assets`)
= note: this error originates in the macro `$crate::impl_bench_name_tests` which comes from the expansion of the macro `benchmarks_instance_pallet` (in Nightly builds, run with -Z macro-backtrace for more info)
error: could not compile `pallet-assets` due to previous error
warning: build failed, waiting for other jobs to finish...
UPDATE: This is a permalink to the benchmark which I added that lead to this error: https://github.com/paritytech/substrate/blob/2d3b6507817d66f6e2e697074bfc806e4a6eb2a8/frame/assets/src/benchmarking.rs#L180-L180