Cargo: decouple crate from main Cargo.toml workspace#7525
Merged
rbradford merged 7 commits intocloud-hypervisor:mainfrom Dec 9, 2025
Merged
Cargo: decouple crate from main Cargo.toml workspace#7525rbradford merged 7 commits intocloud-hypervisor:mainfrom
rbradford merged 7 commits intocloud-hypervisor:mainfrom
Conversation
phip1611
commented
Nov 27, 2025
phip1611
commented
Nov 27, 2025
Member
Author
|
From today's cloud hypervisor office meeting: Yes, it is a great improvement, we want to go that way (Rob) |
4d0b9d2 to
544c9ab
Compare
13 tasks
378de4b to
0259156
Compare
Member
Author
|
ping @RuoqingHe - I needed to take special care for the riscv job: bc4a2bd |
796c055 to
bc4a2bd
Compare
7615b35 to
cc3bd62
Compare
alyssais
approved these changes
Dec 5, 2025
| let target_cmd_path = format!("{target_artifact_dir}/{cmd}"); | ||
|
|
||
| let full_path = workspace_root.join(&target_cmd_path); | ||
| String::from(full_path.to_str().unwrap()) |
Member
There was a problem hiding this comment.
Just a thought, not a blocker at all: I wonder if we could use e.g. env!("CARGO_BIN_EXE_cloud-hypervisor") and get rid of this function. It should at least work for the code in tests/, but I'm not sure if it would be set when the test_infra crate is built, so if not it would require the two other users of this function to be adjusted to take an executable path as a parameter passed by code in tests/.
Merged
via the queue into
cloud-hypervisor:main
with commit Dec 9, 2025
0be7d1b
48 of 49 checks passed
phip1611
added a commit
to phip1611/cloud-hypervisor
that referenced
this pull request
Dec 17, 2025
This is the first commit of the cherry-pick from [0]. [0] cloud-hypervisor#7525 Signed-off-by: Philipp Schuster <philipp.schuster@cyberus-technology.de> On-behalf-of: SAP philipp.schuster@sap.com
phip1611
added a commit
to phip1611/cloud-hypervisor
that referenced
this pull request
Dec 17, 2025
This is the last commit of the cherry-pick from [1]. `cargo rustc` is incompatible with virtual manifests, so the CI needs to use cargo build instead. However, passing `RUSTFLAGS="-D warnings"` via the environment would propagate to all dependencies, and some of them currently fail to build under ``-D warnings` due to issues like [0]: ``` error: creating a mutable reference to mutable static --> src/temp.rs:97:5 | 97 | DIRS.pop() | ^^^^^^^^^^ mutable reference to mutable static ``` To resolve this, apply ``-D warnings` only to the `cargo clippy` commands (which apply to our workspace only) and avoid enforcing it for the entire cargo build. [0]: https://github.com/cloud-hypervisor/cloud-hypervisor/actions/runs/19962283528/job/57245376263?pr=7525 [1]: cloud-hypervisor#7525 Signed-off-by: Philipp Schuster <philipp.schuster@cyberus-technology.de> On-behalf-of: SAP philipp.schuster@sap.com
phip1611
added a commit
to phip1611/cloud-hypervisor
that referenced
this pull request
Dec 17, 2025
This is the first commit of the cherry-pick from [0]. [0] cloud-hypervisor#7525 Signed-off-by: Philipp Schuster <philipp.schuster@cyberus-technology.de> On-behalf-of: SAP philipp.schuster@sap.com
phip1611
added a commit
to phip1611/cloud-hypervisor
that referenced
this pull request
Dec 17, 2025
This is the last commit of the cherry-pick from [1]. `cargo rustc` is incompatible with virtual manifests, so the CI needs to use cargo build instead. However, passing `RUSTFLAGS="-D warnings"` via the environment would propagate to all dependencies, and some of them currently fail to build under ``-D warnings` due to issues like [0]: ``` error: creating a mutable reference to mutable static --> src/temp.rs:97:5 | 97 | DIRS.pop() | ^^^^^^^^^^ mutable reference to mutable static ``` To resolve this, apply ``-D warnings` only to the `cargo clippy` commands (which apply to our workspace only) and avoid enforcing it for the entire cargo build. [0]: https://github.com/cloud-hypervisor/cloud-hypervisor/actions/runs/19962283528/job/57245376263?pr=7525 [1]: cloud-hypervisor#7525 Signed-off-by: Philipp Schuster <philipp.schuster@cyberus-technology.de> On-behalf-of: SAP philipp.schuster@sap.com
phip1611
added a commit
to phip1611/libvirt-tests
that referenced
this pull request
Dec 17, 2025
Since PR #7525 (Dec 2025)[0], Cloud Hypervisor uses a virtual Cargo manifest and the main package was moved to the `./cloud-hypervisor` subdirectory. This change is effective since v50. As our v49-based CHV version backported these changes already, we need to adapt the Nix build of CHV. [0] cloud-hypervisor/cloud-hypervisor#7525
1 task
phip1611
added a commit
to phip1611/libvirt-tests
that referenced
this pull request
Dec 17, 2025
Since PR #7525 (Dec 2025)[0], Cloud Hypervisor uses a virtual Cargo manifest and the main package was moved to the `./cloud-hypervisor` subdirectory. This change is effective since v50. As our v49-based CHV version backported these changes already, we need to adapt the Nix build of CHV. [0] cloud-hypervisor/cloud-hypervisor#7525 Signed-off-by: Philipp Schuster <philipp.schuster@cyberus-technology.de> On-behalf-of: SAP philipp.schuster@sap.com
phip1611
added a commit
to phip1611/libvirt-tests
that referenced
this pull request
Jan 6, 2026
Since PR #7525 (Dec 2025)[0], Cloud Hypervisor uses a virtual Cargo manifest and the main package was moved to the `./cloud-hypervisor` subdirectory. This change is effective since v50. Since we updated our Cloud Hypervisor to v50 [1], we need to adjust that here. [0] cloud-hypervisor/cloud-hypervisor#7525 [1] cyberus-technology/cloud-hypervisor#60 Signed-off-by: Philipp Schuster <philipp.schuster@cyberus-technology.de> On-behalf-of: SAP philipp.schuster@sap.com
phip1611
added a commit
to phip1611/libvirt-tests
that referenced
this pull request
Jan 6, 2026
Since PR #7525 (Dec 2025)[0], Cloud Hypervisor uses a virtual Cargo manifest and the main package was moved to the `./cloud-hypervisor` subdirectory. This change is effective since v50, which we just upgraded to [1]. [0] cloud-hypervisor/cloud-hypervisor#7525 [1] cyberus-technology/cloud-hypervisor#60 Signed-off-by: Philipp Schuster <philipp.schuster@cyberus-technology.de> On-behalf-of: SAP philipp.schuster@sap.com
phip1611
pushed a commit
to phip1611/libvirt-tests
that referenced
this pull request
Jan 6, 2026
Since PR #7525 (Dec 2025)[0], Cloud Hypervisor uses a virtual Cargo manifest and the main package was moved to the `./cloud-hypervisor` subdirectory. This change is effective since v50, which we just upgraded to [1]. [0] cloud-hypervisor/cloud-hypervisor#7525 [1] cyberus-technology/cloud-hypervisor#60 Signed-off-by: Philipp Schuster <philipp.schuster@cyberus-technology.de> On-behalf-of: SAP philipp.schuster@sap.com
phip1611
added a commit
to phip1611/libvirt-tests
that referenced
this pull request
Jan 6, 2026
Since PR #7525 (Dec 2025)[0], Cloud Hypervisor uses a virtual Cargo manifest and the main package was moved to the `./cloud-hypervisor` subdirectory. This change is effective since v50, which we just upgraded to [1]. [0] cloud-hypervisor/cloud-hypervisor#7525 [1] cyberus-technology/cloud-hypervisor#60 Signed-off-by: Philipp Schuster <philipp.schuster@cyberus-technology.de> On-behalf-of: SAP philipp.schuster@sap.com
phip1611
added a commit
to phip1611/libvirt-tests
that referenced
this pull request
Jan 6, 2026
Since PR #7525 (Dec 2025)[0], Cloud Hypervisor uses a virtual Cargo manifest and the main package was moved to the `./cloud-hypervisor` subdirectory. This change is effective since v50, which we just upgraded to [1]. [0] cloud-hypervisor/cloud-hypervisor#7525 [1] cyberus-technology/cloud-hypervisor#60 Signed-off-by: Philipp Schuster <philipp.schuster@cyberus-technology.de> On-behalf-of: SAP philipp.schuster@sap.com
phip1611
added a commit
to phip1611/libvirt-tests
that referenced
this pull request
Jan 6, 2026
Since PR #7525 (Dec 2025)[0], Cloud Hypervisor uses a virtual Cargo manifest and the main package was moved to the `./cloud-hypervisor` subdirectory. This change is effective since v50, which we just upgraded to [1]. [0] cloud-hypervisor/cloud-hypervisor#7525 [1] cyberus-technology/cloud-hypervisor#60 Signed-off-by: Philipp Schuster <philipp.schuster@cyberus-technology.de> On-behalf-of: SAP philipp.schuster@sap.com
phip1611
added a commit
to phip1611/libvirt-tests
that referenced
this pull request
Jan 7, 2026
Since PR #7525 (Dec 2025)[0], Cloud Hypervisor uses a virtual Cargo manifest and the main package was moved to the `./cloud-hypervisor` subdirectory. This change is effective since v50, which we just upgraded our Cloud Hypervisor patchset to [1]. [0] cloud-hypervisor/cloud-hypervisor#7525 [1] cyberus-technology/cloud-hypervisor#60 Signed-off-by: Philipp Schuster <philipp.schuster@cyberus-technology.de> On-behalf-of: SAP philipp.schuster@sap.com
phip1611
added a commit
to phip1611/libvirt-tests
that referenced
this pull request
Jan 7, 2026
Since PR #7525 (Dec 2025)[0], Cloud Hypervisor uses a virtual Cargo manifest and the main package was moved to the `./cloud-hypervisor` subdirectory. This change is effective since v50, which we just upgraded our Cloud Hypervisor patchset to [1]. [0] cloud-hypervisor/cloud-hypervisor#7525 [1] cyberus-technology/cloud-hypervisor#60 Signed-off-by: Philipp Schuster <philipp.schuster@cyberus-technology.de> On-behalf-of: SAP philipp.schuster@sap.com
github-merge-queue bot
pushed a commit
to cyberus-technology/libvirt-tests
that referenced
this pull request
Jan 7, 2026
Since PR #7525 (Dec 2025)[0], Cloud Hypervisor uses a virtual Cargo manifest and the main package was moved to the `./cloud-hypervisor` subdirectory. This change is effective since v50, which we just upgraded our Cloud Hypervisor patchset to [1]. [0] cloud-hypervisor/cloud-hypervisor#7525 [1] cyberus-technology/cloud-hypervisor#60 Signed-off-by: Philipp Schuster <philipp.schuster@cyberus-technology.de> On-behalf-of: SAP philipp.schuster@sap.com
phip1611
added a commit
to phip1611/nixpkgs
that referenced
this pull request
Jan 20, 2026
Since v50.0, Cloud Hypervisor unit test "just works" without restrictions [0]. Also, `--workspace` is no longer needed [1] in theory, but we need it here to use `--exclude`. We still need some excludes for certain platforms, tho. [0] cloud-hypervisor/cloud-hypervisor#7487 [1] cloud-hypervisor/cloud-hypervisor#7525
MiniHarinn
pushed a commit
to MiniHarinn/nixpkgs
that referenced
this pull request
Feb 2, 2026
Since v50.0, Cloud Hypervisor unit test "just works" without restrictions [0]. Also, `--workspace` is no longer needed [1] in theory, but we need it here to use `--exclude`. We still need some excludes for certain platforms, tho. [0] cloud-hypervisor/cloud-hypervisor#7487 [1] cloud-hypervisor/cloud-hypervisor#7525
stevenhorsman
added a commit
to stevenhorsman/cloud-hypervisor
that referenced
this pull request
Feb 3, 2026
In kata-containers we use the api_client create, but it's currently failing our cargo deny check due to missing license, and there aren't any license files within the crate, so I haven't found a good way to work around this. Alternatively I'd be happy to add the license to the workspace crate and then reference it here, but that seems to clash with the direction of the project in cloud-hypervisor#7525. Signed-off-by: stevenhorsman <steven@uk.ibm.com>
stevenhorsman
added a commit
to stevenhorsman/cloud-hypervisor
that referenced
this pull request
Feb 3, 2026
In kata-containers we use the api_client crate, but it's currently failing our cargo deny check due to missing license, and there aren't any license files within the crate, so I haven't found a good way to work around this. Alternatively I'd be happy to add the license to the workspace crate and then reference it here, but that seems to clash with the direction of the project in cloud-hypervisor#7525. Signed-off-by: stevenhorsman <steven@uk.ibm.com>
stevenhorsman
added a commit
to stevenhorsman/cloud-hypervisor
that referenced
this pull request
Feb 3, 2026
In kata-containers we use the api_client crate, but it's currently failing our cargo deny check due to missing license, and there aren't any license files within the crate, so I haven't found a good way to work around this. Alternatively I'd be happy to add the license to the workspace crate and then reference it here, but that seems to clash with the direction of the project in cloud-hypervisor#7525. Signed-off-by: stevenhorsman <steven@uk.ibm.com>
stevenhorsman
added a commit
to stevenhorsman/cloud-hypervisor
that referenced
this pull request
Feb 3, 2026
In kata-containers we use the api_client crate, but it's currently failing our cargo deny check due to missing license, and there aren't any license files within the crate, so I haven't found a good way to work around this. Alternatively I'd be happy to add the license to the workspace crate and then reference it here, but that seems to clash with the direction of the project in cloud-hypervisor#7525. Signed-off-by: stevenhorsman <steven@uk.ibm.com>
stevenhorsman
added a commit
to stevenhorsman/cloud-hypervisor
that referenced
this pull request
Feb 3, 2026
In kata-containers we use the api_client crate, but it's currently failing our cargo deny check due to missing license, and there aren't any license files within the crate, so I haven't found a good way to work around this. Alternatively I'd be happy to add the license to the workspace crate and then reference it here, but that seems to clash with the direction of the project in cloud-hypervisor#7525. Signed-off-by: stevenhorsman <steven@uk.ibm.com>
github-merge-queue bot
pushed a commit
that referenced
this pull request
Feb 3, 2026
In kata-containers we use the api_client crate, but it's currently failing our cargo deny check due to missing license, and there aren't any license files within the crate, so I haven't found a good way to work around this. Alternatively I'd be happy to add the license to the workspace crate and then reference it here, but that seems to clash with the direction of the project in #7525. Signed-off-by: stevenhorsman <steven@uk.ibm.com>
Mynacol
pushed a commit
to Mynacol/nixpkgs
that referenced
this pull request
Feb 3, 2026
Since v50.0, Cloud Hypervisor unit test "just works" without restrictions [0]. Also, `--workspace` is no longer needed [1] in theory, but we need it here to use `--exclude`. We still need some excludes for certain platforms, tho. [0] cloud-hypervisor/cloud-hypervisor#7487 [1] cloud-hypervisor/cloud-hypervisor#7525
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This is my solution for #7524 which we discussed in todays Cloud Hypervisor office hour. I think it improves certain things:
TL;DR improvements
cargo test|check|clippynow run on the whole workspace by default (without explicit--all/--workspace)Cargo.tomlis not so overwhelming anymore-D warningsall the time)More info in ticket or commit message.
Steps
cloud-hypervisor./srcto new workspace member./teststo new workspace member