Updating dependencies
When you have multiple packages which depend on each other, you’ll likely want to keep those dependencies up to date.
For example, Knope depends on the knope-versioning
crate.
Whenever knope-versioning
is updated, the new version should appear in:
knope-versioning
’sCargo.toml
, defining the new version of the packageknope
’sCargo.toml
, specifying the new version ofknope-versioning
as a dependency- The workspace
Cargo.lock
, recording the exact version ofknope-versioning
used by the workspace
Before adding dependency updates, the relevant package config looks like this:
The lock file can be added as a normal path. Because it has a specific file name, Knope knows what file type it is.
Knope will use the package.name
field from the first Cargo.toml
file to determine which package to update in Cargo.lock
.
For the other Cargo.toml
file, you must specify that a dependency within the file is what should be versioned,
not the package itself: