We can keep track of outdated dependencies in the shotover repo by looking at deps.rs or setting up and using the cargo upgrades tool.
Of all the currently out of date dependencies we have the following which are trivially upgradable:
scylla - One of the cassandra drivers used in our integration tests and benchmarks.
cached - a macro for caching the results of function calls.
These dependencies can be trivially updated without changing the code, we just need to change the version used in the Cargo.toml files.
In general, when updating dependencies, we need to change our Cargo.toml when a dependency has a new major version released.
The minor and patch versions will be managed by cargo automatically, which it keeps track of in the Cargo.lock file, we can instruct cargo to update the minor and patch versions by running cargo update. (You should do so after upgrading scylla and cached)
In the case of both scylla and cached they both have a major version of 0. i.e. the version looks like 0.x.y
In rust, a major version of 0, means that the version is effectively shifted left by one.
The minor version takes on the role of the major version.
And the patch version takes on the role of the minor version.
Normally I would just include such straightforward upgrades in with the more involved upgrades, but I've made this a separate issue to serve as an introduction to dependency management with rust.
We can keep track of outdated dependencies in the shotover repo by looking at deps.rs or setting up and using the cargo upgrades tool. Of all the currently out of date dependencies we have the following which are trivially upgradable:
scylla
- One of the cassandra drivers used in our integration tests and benchmarks.cached
- a macro for caching the results of function calls.These dependencies can be trivially updated without changing the code, we just need to change the version used in the
Cargo.toml
files.Cargo follows semantic versioning.
In general, when updating dependencies, we need to change our
Cargo.toml
when a dependency has a new major version released. The minor and patch versions will be managed by cargo automatically, which it keeps track of in theCargo.lock
file, we can instruct cargo to update the minor and patch versions by runningcargo update
. (You should do so after upgradingscylla
andcached
)In the case of both
scylla
andcached
they both have a major version of 0. i.e. the version looks like0.x.y
In rust, a major version of 0, means that the version is effectively shifted left by one. The minor version takes on the role of the major version. And the patch version takes on the role of the minor version.Normally I would just include such straightforward upgrades in with the more involved upgrades, but I've made this a separate issue to serve as an introduction to dependency management with rust.