Closed a-moreira closed 1 year ago
@tdelabro I created a PR here to do this https://github.com/rusty-crewmates/substrate-tutorials/pull/37
Thanks a lot @a-moreira ! It's merged
Closed by #37
@a-moreira which substrate-node-template version we will use with this polkadot-v0.9.28 i tried latest and polkadot-v0.9.28 one and it give me errors.
error[E0412]: cannot find type `String` in this scope
--> /home/haider/.cargo/git/checkouts/substrate-7e08433d4c370a21/ce10b9f/primitives/finality-grandpa/src/lib.rs:43:2
|
43 | app_crypto!(ed25519, GRANDPA);
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ not found in this scope
|
= note: this error originates in the macro `$crate::app_crypto_pair_functions_if_std` which comes from the expansion of the macro `app_crypto` (in Nightly builds, run with -Z macro-backtrace for more info)
help: consider importing one of these items
|
42 | use alloc::string::String;
|
42 | use codec::alloc::string::String;
|
42 | use scale_info::prelude::string::String;
|
Some errors have detailed explanations: E0412, E0433.
For more information about an error, try `rustc --explain E0412`.
i was trying runtime exercise but seems to be stucked here.
@Haider-Ali-DS can you share the steps you took so I can reproduce the error here?
I tried checking, building and testing the ex02-runtime
exercise (on the plain main branch) and it worked normally here.
@Haider-Ali-DS You are supposed to use the substrate-node-template version that exist on the repo as a git sub-repository. I upgraded it to v0.9.28 just after I merged @a-moreira PR.
@a-moreira @tdelabro yeah i have cloned that into respective folder i also checked out my substrate-node-template to 0.9.28 version. i think issue is something else then. first of all i was having some issue related to js features wasm while building substrate. after that i added this crate in dependencies of substrate
getrandom = {version = "0.2", default-features = false, features = ["custom"]}
and from there i started to have this app_crypto! issue
the js
issue appears when a crate is imported without default-feature = false
in a wasm
environment.
Adding getrandom
won't solve anything.
I managed to reproduce it. I'm currently fixing it. Thanks a lot for signaling this issue
I pushed the fix to main just now. Please try again :)
machine:
aarch64-darwin
Just forked and cloned the repo and tried to the run the tests:
--
I've seen this error before when building older versions of Substrate. I can fix this by upgrading version to
polkadot-v0.9.28
in the exercises.