Closed tcr closed 8 years ago
I don't really know anything about Rust modules and package management—what is the best practice? ( i'm really just looking for a learning opportunity)
@rwaldron tldr Package management is very similar to npm. Packages are versioned using semver. Dependencies are treated as "0.3" = "^0.3.0", etc.
The reason for this PR: Because cargo uses a global cache, unlike node_modules, we have a weird circuitous issue where we can't bump two crates in the same repo at the same time. I wanted to test using Travis CI the accelerometer crate that depends on a new Tessel crate, but I don't want to change Cargo.toml to list it as a local path (since you can't publish it from source that way). So we need to bump the Tessel crate, publish, then test and bump the Accelerometer crate to have it pass Travis.yml.
Having multiple crates in one repo isn't unheard of: https://github.com/alexcrichton/futures-rs Usually it's a stopgap before splitting out into many crates, as we will do here once the API stops changing.
Any more questions definitely ask me :)
Incidentally I think I solved the circuitous issue. You can specify a path AND a version.
I botched the last publish, so this time it's being published as 0.1.1.