paritytech / polkadot-sdk

The Parity Polkadot Blockchain SDK
https://polkadot.network/
1.78k stars 639 forks source link

pallet macro: Tasks doesn't support instantiable pallets. #5185

Open gui1117 opened 1 month ago

gui1117 commented 1 month ago

The code only handles non instantiable pallets like this:

                impl<T: Config> core::fmt::Debug for #ident<#type_use_generics> {
                    fn fmt(&self, f: &mut core::fmt::Formatter<'_>) -> core::fmt::Result {
                        f.debug_struct(stringify!(#ident)).field("value", self).finish()
                    }
                }
ggwpez commented 1 month ago

cc @gupnik

gui1117 commented 1 month ago

I have an initial implementation here: https://github.com/paritytech/polkadot-sdk/compare/master...gui1117:gui-tasks-instantiable-pallets?expand=1