-
Notifications
You must be signed in to change notification settings - Fork 1.1k
Improve error message in benchmark macro #7873
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
Merged
Merged
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
99b7612 to
d4d0ec5
Compare
Contributor
Author
|
/cmd update-ui |
Contributor
|
Command "update-ui" has started 🚀 See logs here |
Contributor
|
Command "update-ui" has finished ✅ See logs here |
georgepisaltu
approved these changes
Mar 11, 2025
…ui-better-error-message
bkchr
approved these changes
Mar 11, 2025
|
All GitHub workflows were cancelled due to failure one of the required jobs. |
ordian
added a commit
that referenced
this pull request
Mar 17, 2025
* origin: (325 commits) Add an extra_constant to pallet-treasury (#7918) Bump the ci_dependencies group across 1 directory with 4 updates (#7855) remove compromised action (#7934) Fixing token-economics dead link (#5302) [pallet-revive] Fix pallet-revive-fixtures build.rs (#7928) cumulus: fix pov exporter format (#7923) sp-api: Support `mut` in `impl_runtime_apis!` (#7924) Remove clones from block seal function (#7917) [pallet-revive] precompiles 2->9 (#7810) Use non-native token to benchmark xcm on asset hub (#7893) [CI] bump timeout wait for build in zombienet workflows. (#7871) taplo: split long array line to multiline array (#7905) [pallet-revive] fixture as dev dep (#7844) notifications/libp2p: Punish notification protocol misbehavior on outbound substreams (#7781) [Release|CI/CD] Update version of the cache action in the Publish docker ci (#7892) Remove `pallet::getter` usage from bridges/modules (#7120) [pallet-revive] Support blocktag in eth_getLogs RPC (#7879) Improve error message in benchmark macro (#7873) staking: add `manual_slash` extrinsic (#7805) Remove execute_with_origin implementation in the XCM executor (#7889) ...
alindima
pushed a commit
that referenced
this pull request
Apr 8, 2025
giving the wrong origin in `extrinsic_call` would result in:
```
|
43 | #[benchmarks]
| ^^^^^^^^^^^^^
| |
| expected associated type, found `Result<RawOrigin<...>, ...>`
| arguments to this function are incorrect
|
= note: expected associated type `<T as frame_system::Config>::RuntimeOrigin`
found enum `Result<RawOrigin<<T as frame_system::Config>::AccountId>, <T as frame_system::Config>::RuntimeOrigin>`
note: method defined here
--> $WORKSPACE/substrate/frame/support/src/traits/dispatch.rs
|
| fn dispatch_bypass_filter(self, origin: Self::RuntimeOrigin) -> DispatchResultWithPostInfo;
| ^^^^^^^^^^^^^^^^^^^^^^
= note: this error originates in the attribute macro `benchmarks` (in Nightly builds, run with -Z macro-backtrace for more info)
```
Now it results in an error message with good span.
---------
Co-authored-by: cmd[bot] <41898282+github-actions[bot]@users.noreply.github.com>
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
giving the wrong origin in
extrinsic_callwould result in:Now it results in an error message with good span.