construct_runtime: Fix generation of types behind features (#12229)

* construct_runtime: Fix generation of types behind features

With the recent addition of supporting features in `construct_runtime!` there was a bug overseen.
The `AllPalletsWithSystem` etc type declarations would be declared twice when a certain was enabled.
The problem was that in the macro we didn't feature gate the types that should be declared when
there is no feature enabled. This pull request now takes care of feature gating this type behind
`all(#( not(feature) ))`. So, these types will only be enabled if no of the configured features is enabled.

* Fix tests

* FMT
This commit is contained in:
Bastian Köcher
2022-09-10 20:50:59 +01:00
committed by GitHub
parent fc9848ce0d
commit 5647e71947
4 changed files with 133 additions and 92 deletions
@@ -251,7 +251,7 @@ test-frame-support:
RUN_UI_TESTS: 1
script:
- rusty-cachier snapshot create
- time cargo test -p frame-support-test --features=conditional-storage,no-metadata-docs --manifest-path ./frame/support/test/Cargo.toml --test pallet # does not reuse cache 1 min 44 sec
- time cargo test -p frame-support-test --features=frame-feature-testing,no-metadata-docs --manifest-path ./frame/support/test/Cargo.toml --test pallet # does not reuse cache 1 min 44 sec
- SUBSTRATE_TEST_TIMEOUT=1 time cargo test -p substrate-test-utils --release --verbose --locked -- --ignored timeout
- rusty-cachier cache upload