-
Notifications
You must be signed in to change notification settings - Fork 102
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Proposal: Improve Cargo dependency format #199
Comments
This proposal sounds sane to me. We can enable dependabot updates for rust-vmm crates as well so that we can merge the dependency updates easier. CC: @rbradford @sboeuf @bonzini @jiangliu what do you think? |
Looks good to me:) |
Sounds good to me |
I agree that switching to I've started packaging rust-vmm components in Fedora, and dealing with |
Mentioned in semver-compatibility:
So we can increase |
This is our current strategy. This is why your proposal for using caret dependencies works even for crates that are not at a major version. I think we can separate the discussions:
|
Fixes: rust-vmm/vm-memory#199 Signed-off-by: wllenyj <[email protected]>
We should use caret requirements for crates that are not yet on a major release. This helps with avoiding breaking changes because for any crate specified as 0.x.y, when a new release is available, cargo will only pick up new patch releases. Related issues: - rust-vmm/vm-memory#199 - rust-vmm/community#131 Signed-off-by: Andreea Florescu <[email protected]>
Due to the release of vmm-sys-util version 0.10.0 there are multiple vmm-sys-util dependencies. This will be resolved in rust-vmm/vm-memory#199. Signed-off-by: wllenyj <[email protected]>
Due to the release of vmm-sys-util version 0.10.0 there are multiple vmm-sys-util dependencies. This will be resolved in rust-vmm/vm-memory#199. Signed-off-by: wllenyj <[email protected]>
Due to the release of vmm-sys-util version 0.10.0 there are multiple vmm-sys-util dependencies. This will be resolved in rust-vmm/vm-memory#199. Signed-off-by: wllenyj <[email protected]>
Due to the release of vmm-sys-util version 0.10.0 there are multiple vmm-sys-util dependencies. This will be resolved in rust-vmm/vm-memory#199. Signed-off-by: wllenyj <[email protected]>
Due to the release of vmm-sys-util version 0.10.0 there are multiple vmm-sys-util dependencies. This will be resolved in rust-vmm/vm-memory#199. Signed-off-by: wllenyj <[email protected]>
Due to the release of vmm-sys-util version 0.10.0 there are multiple vmm-sys-util dependencies. This will be resolved in rust-vmm/vm-memory#199. Signed-off-by: wllenyj <[email protected]>
Due to the release of vmm-sys-util version 0.10.0 there are multiple vmm-sys-util dependencies. This will be resolved in rust-vmm/vm-memory#199. Signed-off-by: wllenyj <[email protected]>
Due to the release of vmm-sys-util version 0.10.0 there are multiple vmm-sys-util dependencies. This will be resolved in rust-vmm/vm-memory#199. Signed-off-by: wllenyj <[email protected]>
We should use caret requirements for crates that are not yet on a major release. This helps with avoiding breaking changes because for any crate specified as 0.x.y, when a new release is available, cargo will only pick up new patch releases. Related issues: - rust-vmm/vm-memory#199 - rust-vmm/community#131 Signed-off-by: Andreea Florescu <[email protected]>
Fixes: rust-vmm/vm-memory#199 Signed-off-by: wllenyj <[email protected]>
This is not fixed for vm-memory, re-opening the issue. |
This way the deps that are below 1.0 will only be updated at the patch level, and the ones >= 1.0, at the patch and minor levels. Fixes: rust-vmm#199. Also updated vmm-sys-util to latest version available. Signed-off-by: Laura Loghin <[email protected]>
This way the deps that are below 1.0 will only be updated at the patch level, and the ones >= 1.0, at the patch and minor levels. Fixes: rust-vmm#199. Also updated vmm-sys-util to latest version available. Signed-off-by: Laura Loghin <[email protected]>
This way the deps that are below 1.0 will only be updated at the patch level, and the ones >= 1.0, at the patch and minor levels. Fixes: #199. Also updated vmm-sys-util to latest version available. Signed-off-by: Laura Loghin <[email protected]>
Since the upstream rust-vmm is changing its dependency style towards caret requirements in these days (more information: rust-vmm/vm-memory#199) and it breaks Dragonball compilation frequently. rust-vmm is expected to finish the changes this week and in order to not break Kata CI due to Dragonball's compilation error, we will add Cargo.lock file into /src/dragonball first and remove it later when rust-vmm is stable. fixes: kata-containers#5657 Signed-off-by: Chao Wu <[email protected]>
Since the upstream rust-vmm is changing its dependency style towards caret requirements in these days (more information: rust-vmm/vm-memory#199) and it breaks Dragonball compilation frequently. rust-vmm is expected to finish the changes this week and in order to not break Kata CI due to Dragonball's compilation error, we will add Cargo.lock file into /src/dragonball first and remove it later when rust-vmm is stable. fixes: kata-containers#5657 Depends-on: kata-containers#5640 Signed-off-by: Chao Wu <[email protected]>
Since the upstream rust-vmm is changing its dependency style towards caret requirements in these days (more information: rust-vmm/vm-memory#199) and it breaks Dragonball compilation frequently. rust-vmm is expected to finish the changes this week and in order to not break Kata CI due to Dragonball's compilation error, we will add Cargo.lock file into /src/dragonball first and remove it later when rust-vmm is stable. fixes: kata-containers#5657 Signed-off-by: Chao Wu <[email protected]>
Since the upstream rust-vmm is changing its dependency style towards caret requirements in these days (more information: rust-vmm/vm-memory#199) and it breaks Dragonball compilation frequently. rust-vmm is expected to finish the changes this week and in order to not break Kata CI due to Dragonball's compilation error, we will add Cargo.lock file into /src/dragonball first and remove it later when rust-vmm is stable. fixes: kata-containers#5657 Depends-on: github.com/kata-containers#5640 Signed-off-by: Chao Wu <[email protected]>
Since the upstream rust-vmm is changing its dependency style towards caret requirements in these days (more information: rust-vmm/vm-memory#199) and it breaks Dragonball compilation frequently. rust-vmm is expected to finish the changes this week and in order to not break Kata CI due to Dragonball's compilation error, we will add Cargo.lock file into /src/dragonball first and remove it later when rust-vmm is stable. fixes: kata-containers#5657 Signed-off-by: Chao Wu <[email protected]>
The crates in rust-vmm use
>=
comparison-requirements to specify specific dependencies. This places a significant maintenance burden on the user who uses it.Problem
We use
vm-memory
as an example because the structure ofvm-memory
runs through the vmm ecosystem and cannot use two different versions. See version-incompatibility-hazards for reasons.my-lib 0.1.0
, it depends onlinux-loader
andvm-memory
, andlinux-loader
depends onvm-memory >= 0.6
. The version ofmy-lib
that depends onvm-memory
requires:0.8.0
, not older versions.vm-memory 0.9.0
is released, it will be a disaster. Since cargo's strategy is to use the greatest version. Then, all libraries that depend onvm-memory >=
must be fixed and released a new version. And the previousmy-lib 0.1.0
will not work. This break is silent.cargo update -p vm-memory:0.9.0 --precise 0.8.0
. And we have to lock thelinux-loader
as well. But when my-lib is released, it still can't work.Solution
According to cargo recommendations:
Use caret requirements for dependencies, such as
1.2.3
, for most situations. This ensures that the resolver can be maximally flexible in choosing a version while maintaining build compatibility.And most open sources also use the SemVer version requirement(
x.y.z
), which is equivalent to Caret requirements(^x.y.z
).Mentioned in document specifying-dependencies:
The SemVer version requirement can solve the problems mentioned earlier.
linux-loader 0.5.x
corresponds tovm-memory 0.9.x
, x upgrade does not break compatibility either.Drawbacks
You can also not create it, then the incompatible version needs to be released immediately after the API incompatible change is merged.
Required Work
Progress
Thanks.
The text was updated successfully, but these errors were encountered: