mirror of
https://github.com/pezkuwichain/pezkuwi-subxt.git
synced 2026-06-13 18:41:05 +00:00
frame: GenesisBuild::build allowed in no_std (#14107)
* frame: GenesisBuild::build allowed in no_std i`GenesisBuild::build` function will be required for no_std in no native runtime world. `GenesisBuild::build` macro generated function allows to build the runtime GenesisConfig assembled from all pallets' GenesisConfigs. * fixes * GenesisBuild::build avaiable in no-std - #[cfg(feature = "std")] is not longer added to GenesisBuild implementation. * system: hash69 available for no-std * elections-phragmen: panic message fixed for no_std * frame::suport: doc updated * test-runtime: default for GenesisConfig * frame::test-pallet: serde/std added to std feature deps * Cargo.toml: deps sorted * Cargo.lock update cargo update -p frame-support-test-pallet -p frame-support-test * frame ui tests: cleanup --------- Co-authored-by: parity-processbot <>
This commit is contained in:
committed by
GitHub
parent
2aa863f667
commit
e31a214a85
@@ -36,21 +36,22 @@ test-pallet = { package = "frame-support-test-pallet", default-features = false,
|
||||
[features]
|
||||
default = ["std"]
|
||||
std = [
|
||||
"serde/std",
|
||||
"codec/std",
|
||||
"scale-info/std",
|
||||
"frame-benchmarking/std",
|
||||
"frame-executive/std",
|
||||
"frame-support/std",
|
||||
"frame-system/std",
|
||||
"scale-info/std",
|
||||
"serde/std",
|
||||
"sp-api/std",
|
||||
"sp-arithmetic/std",
|
||||
"sp-core/std",
|
||||
"sp-std/std",
|
||||
"sp-io/std",
|
||||
"sp-runtime/std",
|
||||
"sp-state-machine",
|
||||
"sp-arithmetic/std",
|
||||
"sp-std/std",
|
||||
"sp-version/std",
|
||||
"sp-api/std",
|
||||
"test-pallet/std",
|
||||
]
|
||||
try-runtime = [
|
||||
"frame-support/try-runtime",
|
||||
|
||||
@@ -14,6 +14,7 @@ targets = ["x86_64-unknown-linux-gnu"]
|
||||
[dependencies]
|
||||
codec = { package = "parity-scale-codec", version = "3.2.2", default-features = false, features = ["derive"] }
|
||||
scale-info = { version = "2.0.0", default-features = false, features = ["derive"] }
|
||||
serde = { version = "1.0.136", default-features = false, features = ["derive"] }
|
||||
frame-support = { version = "4.0.0-dev", default-features = false, path = "../../" }
|
||||
frame-system = { version = "4.0.0-dev", default-features = false, path = "../../../system" }
|
||||
|
||||
@@ -24,4 +25,5 @@ std = [
|
||||
"frame-support/std",
|
||||
"frame-system/std",
|
||||
"scale-info/std",
|
||||
"serde/std",
|
||||
]
|
||||
|
||||
@@ -1,130 +0,0 @@
|
||||
error: `Pallet` does not have the std feature enabled, this will cause the `test_pallet::GenesisConfig` type to not implement serde traits.
|
||||
--> tests/construct_runtime_ui/no_std_genesis_config.rs:40:1
|
||||
|
|
||||
40 | / construct_runtime! {
|
||||
41 | | pub struct Runtime where
|
||||
42 | | Block = Block,
|
||||
43 | | NodeBlock = Block,
|
||||
... |
|
||||
48 | | }
|
||||
49 | | }
|
||||
| |_^
|
||||
|
|
||||
= note: this error originates in the macro `test_pallet::__substrate_genesis_config_check::is_std_enabled_for_genesis` which comes from the expansion of the macro `construct_runtime` (in Nightly builds, run with -Z macro-backtrace for more info)
|
||||
|
||||
error[E0277]: the trait bound `frame_support_test_pallet::GenesisConfig: Serialize` is not satisfied
|
||||
--> tests/construct_runtime_ui/no_std_genesis_config.rs:40:1
|
||||
|
|
||||
40 | / construct_runtime! {
|
||||
41 | | pub struct Runtime where
|
||||
42 | | Block = Block,
|
||||
43 | | NodeBlock = Block,
|
||||
... |
|
||||
48 | | }
|
||||
49 | | }
|
||||
| |_^ the trait `Serialize` is not implemented for `frame_support_test_pallet::GenesisConfig`
|
||||
|
|
||||
= help: the following other types implement trait `Serialize`:
|
||||
&'a T
|
||||
&'a mut T
|
||||
()
|
||||
(T0, T1)
|
||||
(T0, T1, T2)
|
||||
(T0, T1, T2, T3)
|
||||
(T0, T1, T2, T3, T4)
|
||||
(T0, T1, T2, T3, T4, T5)
|
||||
and $N others
|
||||
note: required by a bound in `hidden_include::serde::ser::SerializeStruct::serialize_field`
|
||||
--> $CARGO/serde-1.0.162/src/ser/mod.rs
|
||||
|
|
||||
| T: Serialize;
|
||||
| ^^^^^^^^^ required by this bound in `SerializeStruct::serialize_field`
|
||||
= note: this error originates in the macro `construct_runtime` (in Nightly builds, run with -Z macro-backtrace for more info)
|
||||
|
||||
error[E0277]: the trait bound `frame_support_test_pallet::GenesisConfig: Deserialize<'_>` is not satisfied
|
||||
--> tests/construct_runtime_ui/no_std_genesis_config.rs:47:3
|
||||
|
|
||||
47 | Pallet: test_pallet::{Pallet, Config},
|
||||
| ^^^^^^ the trait `Deserialize<'_>` is not implemented for `frame_support_test_pallet::GenesisConfig`
|
||||
|
|
||||
= help: the following other types implement trait `Deserialize<'de>`:
|
||||
<&'a [u8] as Deserialize<'de>>
|
||||
<&'a std::path::Path as Deserialize<'de>>
|
||||
<&'a str as Deserialize<'de>>
|
||||
<() as Deserialize<'de>>
|
||||
<(T0, T1) as Deserialize<'de>>
|
||||
<(T0, T1, T2) as Deserialize<'de>>
|
||||
<(T0, T1, T2, T3) as Deserialize<'de>>
|
||||
<(T0, T1, T2, T3, T4) as Deserialize<'de>>
|
||||
and $N others
|
||||
note: required by a bound in `next_element`
|
||||
--> $CARGO/serde-1.0.162/src/de/mod.rs
|
||||
|
|
||||
| T: Deserialize<'de>,
|
||||
| ^^^^^^^^^^^^^^^^ required by this bound in `SeqAccess::next_element`
|
||||
|
||||
error[E0277]: the trait bound `frame_support_test_pallet::GenesisConfig: Deserialize<'_>` is not satisfied
|
||||
--> tests/construct_runtime_ui/no_std_genesis_config.rs:47:3
|
||||
|
|
||||
47 | Pallet: test_pallet::{Pallet, Config},
|
||||
| ^^^^^^ the trait `Deserialize<'_>` is not implemented for `frame_support_test_pallet::GenesisConfig`
|
||||
|
|
||||
= help: the following other types implement trait `Deserialize<'de>`:
|
||||
<&'a [u8] as Deserialize<'de>>
|
||||
<&'a std::path::Path as Deserialize<'de>>
|
||||
<&'a str as Deserialize<'de>>
|
||||
<() as Deserialize<'de>>
|
||||
<(T0, T1) as Deserialize<'de>>
|
||||
<(T0, T1, T2) as Deserialize<'de>>
|
||||
<(T0, T1, T2, T3) as Deserialize<'de>>
|
||||
<(T0, T1, T2, T3, T4) as Deserialize<'de>>
|
||||
and $N others
|
||||
note: required by a bound in `next_value`
|
||||
--> $CARGO/serde-1.0.162/src/de/mod.rs
|
||||
|
|
||||
| V: Deserialize<'de>,
|
||||
| ^^^^^^^^^^^^^^^^ required by this bound in `MapAccess::next_value`
|
||||
|
||||
error[E0277]: the trait bound `frame_support_test_pallet::GenesisConfig: Deserialize<'_>` is not satisfied
|
||||
--> tests/construct_runtime_ui/no_std_genesis_config.rs:40:1
|
||||
|
|
||||
40 | / construct_runtime! {
|
||||
41 | | pub struct Runtime where
|
||||
42 | | Block = Block,
|
||||
43 | | NodeBlock = Block,
|
||||
... |
|
||||
48 | | }
|
||||
49 | | }
|
||||
| |_^ the trait `Deserialize<'_>` is not implemented for `frame_support_test_pallet::GenesisConfig`
|
||||
|
|
||||
= help: the following other types implement trait `Deserialize<'de>`:
|
||||
<&'a [u8] as Deserialize<'de>>
|
||||
<&'a std::path::Path as Deserialize<'de>>
|
||||
<&'a str as Deserialize<'de>>
|
||||
<() as Deserialize<'de>>
|
||||
<(T0, T1) as Deserialize<'de>>
|
||||
<(T0, T1, T2) as Deserialize<'de>>
|
||||
<(T0, T1, T2, T3) as Deserialize<'de>>
|
||||
<(T0, T1, T2, T3, T4) as Deserialize<'de>>
|
||||
and $N others
|
||||
note: required by a bound in `hidden_include::serde::__private::de::missing_field`
|
||||
--> $CARGO/serde-1.0.162/src/private/de.rs
|
||||
|
|
||||
| V: Deserialize<'de>,
|
||||
| ^^^^^^^^^^^^^^^^ required by this bound in `missing_field`
|
||||
= note: this error originates in the macro `construct_runtime` (in Nightly builds, run with -Z macro-backtrace for more info)
|
||||
|
||||
error[E0277]: the trait bound `frame_support_test_pallet::GenesisConfig: BuildModuleGenesisStorage<Runtime, ()>` is not satisfied
|
||||
--> tests/construct_runtime_ui/no_std_genesis_config.rs:40:1
|
||||
|
|
||||
40 | / construct_runtime! {
|
||||
41 | | pub struct Runtime where
|
||||
42 | | Block = Block,
|
||||
43 | | NodeBlock = Block,
|
||||
... |
|
||||
48 | | }
|
||||
49 | | }
|
||||
| |_^ the trait `BuildModuleGenesisStorage<Runtime, ()>` is not implemented for `frame_support_test_pallet::GenesisConfig`
|
||||
|
|
||||
= help: the trait `BuildModuleGenesisStorage<T, ()>` is implemented for `frame_system::GenesisConfig`
|
||||
= note: this error originates in the macro `construct_runtime` (in Nightly builds, run with -Z macro-backtrace for more info)
|
||||
Reference in New Issue
Block a user