substrate-docs
substrate-docs copied to clipboard
Explain github dependancies and best practices
We need a dedicated place on devhub outlining how to navigate "dependency hell" in Substrate, as versioning is the primary issue for most if you are not careful.
- Reminder of how to specify properly in cargo.toml (git, tag, rev, branch, etc.) and not to manually update
Cargo.lock. But scan the lockfile for multiple versions of the same deps (need to fix this withcargo updateafter setting version & deps repo correctly) - How to set upstream deps for substrate to match a 3rd party pallet's (or better, the opposite)
- How to identify version issues and resolve them with https://doc.rust-lang.org/cargo/commands/cargo-update.html#examples
cargo update -p foo --precise 1.2.3 - {more?}