-
Notifications
You must be signed in to change notification settings - Fork 46
fix: features #353
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
fix: features #353
Changes from 5 commits
c2ed756
5e54aa7
597799c
3493d97
677e9b4
c92232d
c9be8e6
38018cb
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,11 @@ | ||
| for features in "--all-features" "--features runtime-benchmarks" "--features try-runtime" | ||
|
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. When I try to execute this, I receive an
Contributor
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. You have to install
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Would it also make sense to test with no (default) features, and with the mock feature, where specified? Anyway very good solution to the problem!
Contributor
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. yes that's a good idea
Contributor
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. default features are a good idea. But mock doesn'T work since not all of the crates have that feature |
||
| for package in (cargo workspaces list) | ||
| cargo build -p $package (echo $features | string split " ") > /dev/null ^ /dev/null | ||
| if [ "$status" = "0" ] | ||
| echo -n "[ok] " | ||
| else | ||
| echo -n "[fail] " | ||
| end | ||
| echo cargo build -p $package (echo $features | string split " ") | ||
| end | ||
| end | ||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Why does runtime common enable these features upon runtime benchmarks? I'm talking specifically about
attestationandparachain-staking.There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
we need to pass this feature down to all dependencies. If
runtime-benchmarksis enabled, some method in some trait that is guarded by this feature might be enabled too. Ifattestationandframe-supportimplement that trait and we don't enable the feature, this method from the trait would be missing and compilation would fail. So we always need to pass down all features that we use to all the dependencies. Eitherruntime-benchmarksis active for all dependencies or for none. Mixing this would create terrible errors.