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
+4 -3
View File
@@ -47,9 +47,10 @@ std = [
"sp-version/std",
]
try-runtime = ["frame-support/try-runtime"]
# WARNING: CI only execute pallet test with this feature,
# if the feature intended to be used outside, CI and this message need to be updated.
conditional-storage = []
# WARNING:
# Only CI runs with this feature enabled. This feature is for testing stuff related to the FRAME macros
# in conjunction with rust features.
frame-feature-testing = []
# Disable ui tests
disable-ui-tests = []
no-metadata-docs = ["frame-support/no-metadata-docs"]