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

Benchmark macro: Allow multiple bounds in where #8116

Merged

Conversation

weichweich
Copy link
Contributor

@weichweich weichweich commented Feb 14, 2021

The where clause in the benchmark macro supports only a single trait bound for each type constraint.

benchmarks!{
	where_clause {
		where
			// the bound `ThisIsNotSupported`  won't work because there is no rule to match that
			<T as OtherConfig>::OtherEvent: Into<<T as Config>::Event> + ThisIsNotSupported
	}
	...
}

To support multiple bounds, I changed the macro to use tt instead of path and added a few more bounds in the tests to check if it's working.

@shawntabrizi shawntabrizi added C1-low PR touches the given topic and has a low impact on builders. A0-please_review Pull request needs code review. B0-silent Changes should not be mentioned in any release notes labels Feb 15, 2021
@gui1117
Copy link
Contributor

gui1117 commented Feb 15, 2021

bot merge

@ghost
Copy link

ghost commented Feb 15, 2021

Checks failed; merge aborted.

@gui1117
Copy link
Contributor

gui1117 commented Feb 16, 2021

maybe you can merge master to fix CI

@gui1117
Copy link
Contributor

gui1117 commented Feb 18, 2021

:-/ it seems you merged master while substrate and polkadot were broken. If you merge master again it should be fine

@weichweich
Copy link
Contributor Author

:-/ it seems you merged master while substrate and polkadot were broken. If you merge master again it should be fine

I merged the latest master yesterday. There are no new commits to merge. :(

@gui1117 gui1117 merged commit 75a2d29 into paritytech:master Feb 18, 2021
@gui1117
Copy link
Contributor

gui1117 commented Feb 18, 2021

:-/ it seems you merged master while substrate and polkadot were broken. If you merge master again it should be fine

I merged the latest master yesterday. There are no new commits to merge. :(

indeed, I just rerun the job and it worked

@weichweich weichweich deleted the aw-allow-multiple-bounds-in-where branch February 18, 2021 12:25
KalitaAlexey pushed a commit to KalitaAlexey/substrate that referenced this pull request Jul 9, 2021
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
A0-please_review Pull request needs code review. B0-silent Changes should not be mentioned in any release notes C1-low PR touches the given topic and has a low impact on builders.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants