Favor specifying git dependencies in Cargo.toml over submodule usage.
Pulling in submodules (dependencies) that populate repo roots add inconveniences such as:
- Extra setup steps with
git submodule update
. - Editor and developer has difficulties in separating actual repo source dependency source code.
- Usage of two "dependency managers", cargo and git.
cargo update
andcargo clean
is seldom enough.
Just to name a few.
cargo
has supports adding these dependencies in Cargo.toml
using statements such as:
regex = { git = "https://github.com/rust-lang/regex.git", rev = "4c59b707"}
(Further reading: https://doc.rust-lang.org/cargo/reference/specifying-dependencies.html#specifying-dependencies-from-git-repositories.)
Would it be worth deprecating the usage of submodules to using this method instead? Workspace repositories could be used wherever it is common to work on multiple crates at the same time. I believe this change would allow for a simpler build process and a more enjoyable dev experience.
Anyway, sending this as an issue first given that such changes would touch almost every part of Redox. I'm more than willing to give this a try, but I would love to hear your thoughts first.