-
Notifications
You must be signed in to change notification settings - Fork 2.1k
Move part of utils
into vmm
#4730
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
Merged
Merged
Conversation
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
35fb7e6
to
1d84cb9
Compare
Codecov ReportAttention: Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #4730 +/- ##
=======================================
Coverage 84.34% 84.35%
=======================================
Files 249 249
Lines 27512 27504 -8
=======================================
- Hits 23206 23200 -6
+ Misses 4306 4304 -2
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Sentry. |
5943aee
to
28ffa4d
Compare
b57ce62
to
0b403c3
Compare
e647685
to
b5951d3
Compare
ce6c4f6
to
fc28555
Compare
`utilities` has only test related code/binaries, so rename the module with more descriptive name. Signed-off-by: Egor Lazarchuk <[email protected]>
Move content of `test_utils/test_utils/mod.rs` into `test_utils/mod.rs`. This remove the duplication of module names and makes clippy happy. Signed-off-by: Egor Lazarchuk <[email protected]>
Most modules in `utils` are `vmm` specific, so copy them into `vmm/utils`. The actual removal of those files from `utils` will happen in later commit. Signed-off-by: Egor Lazarchuk <[email protected]>
In previous commit we moved `vmm` specific parts of `utils` into `vmm` crate, so now we can remove them from `utils`. Signed-off-by: Egor Lazarchuk <[email protected]>
It is better not to reexport `vmm-sys-util` as it entangles the code. Additionally, the original reason of having one place to update this dependency does not hold any more as now we rely on dependabot for updates, so specifying dependency in multiple crates is not an issue. Signed-off-by: Egor Lazarchuk <[email protected]>
fc28555
to
33e07b9
Compare
roypat
approved these changes
Sep 16, 2024
kalyazin
approved these changes
Sep 16, 2024
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Labels
Status: Awaiting review
Indicates that a pull request is ready to be reviewed
Type: Enhancement
Indicates new feature requests
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.
Changes
vmm
related parts ofutils
intovmm
.vmm_sys_utils
Reason
utils
crate contained a bunch of helper functions/structs, but most of them were only used byvmm
crate, so the coupling between these 2 crates was very high. This created an issue where if we want to add someutility
function/struct to use invmm
, we need to add it instead to theutils
crate, becausevmm
by itself does not haveutils
module. (not includingutilities
which only contain testing code). By moving part ofutils
intovmm/utils
we removevmm
dependency onutils
and make it easier to add/modify utility functions/structs invmm
.Additionally we can remove reexporting of
vmm_sys_utils
from bothutils
andvmm/utils
. This helps with core readability as now there is only 1 place to importvmm_sys_utils
items from: thevmm_sys_utils
crate itself.License Acceptance
By submitting this pull request, I confirm that my contribution is made under
the terms of the Apache 2.0 license. For more information on following Developer
Certificate of Origin and signing off your commits, please check
CONTRIBUTING.md
.PR Checklist
PR.
CHANGELOG.md
.TODO
s link to an issue.contribution quality standards.
rust-vmm
.