Expose instancing in metadata (#3188)

* Expose instancing in metadata

- Introduces metadata v7
- If a module is using instancing, the storage exposes the instance in
metadata
- Metadata module name is now the upper case one given to
`construct_runtime!`

* Remove obsolete macro

* Just expose one prefix

* Bump spec

* Fix prefix generation
This commit is contained in:
Bastian Köcher
2019-07-24 21:40:34 +02:00
committed by GitHub
parent 2b6f664caf
commit f7ff339ebd
11 changed files with 756 additions and 617 deletions
@@ -37,8 +37,8 @@ fn generate_hidden_includes_mod_name(unique_id: &str) -> Ident {
/// Generates the access to the `srml-support` crate.
pub fn generate_crate_access(unique_id: &str, def_crate: &str) -> TokenStream {
if ::std::env::var("CARGO_PKG_NAME").unwrap() == def_crate {
quote::quote!( crate )
if std::env::var("CARGO_PKG_NAME").unwrap() == def_crate {
quote::quote!( srml_support )
} else {
let mod_name = generate_hidden_includes_mod_name(unique_id);
quote::quote!( self::#mod_name::hidden_include )