Skip to content

Conversation

@weichweich
Copy link
Contributor

Checklist:

  • I have verified that the code works
    • No panics! (checked arithmetic ops, no indexing array[3] use get(3), ...)
  • I have verified that the code is easy to understand
    • If not, I have left a well-balanced amount of inline comments
  • I have left the code in a better state
  • I have documented the changes (where applicable)

@weichweich weichweich self-assigned this Apr 8, 2022
@weichweich weichweich marked this pull request as ready for review April 8, 2022 05:58
@weichweich weichweich requested review from ntn-x2 and wischli April 8, 2022 05:58
Copy link
Contributor

@wischli wischli left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM! However, I cannot execute the fish script.

scripts/all.fish Outdated
@@ -0,0 +1,11 @@
for features in "--all-features" "--features runtime-benchmarks" "--features try-runtime"
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

When I try to execute this, I receive an error: no such subcommand: workspaces`.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

You have to install cargo-workspaces. I will add a comment for that.

Copy link
Contributor

@ntn-x2 ntn-x2 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Just two small questions, but otherwise LGTM!

fast-gov = []
runtime-benchmarks = [
"attestation/runtime-benchmarks",
"frame-support/runtime-benchmarks",
Copy link
Contributor

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 attestation and parachain-staking.

Copy link
Contributor Author

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-benchmarks is enabled, some method in some trait that is guarded by this feature might be enabled too. If attestation and frame-support implement 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. Either runtime-benchmarks is active for all dependencies or for none. Mixing this would create terrible errors.

scripts/all.fish Outdated
@@ -0,0 +1,11 @@
for features in "--all-features" "--features runtime-benchmarks" "--features try-runtime"
Copy link
Contributor

Choose a reason for hiding this comment

The 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!

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

yes that's a good idea

Copy link
Contributor Author

Choose a reason for hiding this comment

The 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

@weichweich weichweich enabled auto-merge (squash) April 11, 2022 13:38
@weichweich weichweich merged commit a0b9f86 into develop Apr 11, 2022
@weichweich weichweich deleted the aw-fix-features branch April 11, 2022 13:56
ntn-x2 pushed a commit that referenced this pull request Jun 23, 2022
(cherry picked from commit a0b9f86)
ntn-x2 added a commit that referenced this pull request Jun 24, 2022
* Adds two more relaychain bootnodes for staging environment  (#334)

* chore: reset peregrine stg (#335)

* ci: use custom ci image (#336)

* Optimizes docker layer (#337)

* fix: add did lookup pallet to DID authorization logic + reverse lookup index (#343)

* chore: update toolchain version to nightly 1.59 (#339)

* feat: proxy type for disableling deposit claiming (#341)

* fix: rococo protocol id (#369)

* feat: generic access control (#316)

* Updates toolchain version (#345)

* refactor: enforce no runtime in pallet (#349)

* fix: features (#353)

* feat: add tips pallet (#352)

* feat: upgrade to Polkadot v0.9.19 (#357)

* chore: upgrade and clean up (#360)

* Adds the new rococo chainspec (#363)

* feat: add launch pallet removal migration (#359)

* refactor: update rilt para id from 2015 to 2108 (#364)

* fix: rilt para id (#365)

* feat: upgrade to Polkadot v0.9.23 (#366)

* use ci-linx:production base image (#368)

* feat: upgrade to Polkadot v0.9.24 (#370)

* fix: fix CI builders compilation errors and pin to a specific hash (#372)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants