Closed wllenyj closed 1 year ago
Merging #279 (6550b60) into main (8a6d318) will increase coverage by
0.35%
. The diff coverage is96.03%
.
@@ Coverage Diff @@
## main #279 +/- ##
==========================================
+ Coverage 90.44% 90.79% +0.35%
==========================================
Files 82 94 +12
Lines 24597 26260 +1663
==========================================
+ Hits 22246 23843 +1597
- Misses 2351 2417 +66
Flag | Coverage Δ | |
---|---|---|
dbs-address-space | 95.30% <ø> (ø) |
|
dbs-allocator | 94.98% <ø> (ø) |
|
dbs-arch | 96.37% <ø> (ø) |
|
dbs-boot | 94.90% <ø> (ø) |
|
dbs-device | 92.95% <ø> (ø) |
|
dbs-interrupt | 90.42% <ø> (ø) |
|
dbs-legacy-devices | 92.77% <ø> (ø) |
|
dbs-miniball | ∅ <ø> (∅) |
|
dbs-upcall | 94.31% <ø> (ø) |
|
dbs-utils | 91.25% <ø> (ø) |
|
dbs-versionize | 96.03% <96.03%> (?) |
|
dbs-virtio-devices | 87.34% <ø> (ø) |
Flags with carried forward coverage won't be shown. Click here to find out more.
Impacted Files | Coverage Δ | |
---|---|---|
crates/dbs-versionize/test-data/src/lib.rs | 20.00% <20.00%> (ø) |
|
crates/dbs-versionize/src/version_map.rs | 83.87% <83.87%> (ø) |
|
crates/dbs-versionize/src/lib.rs | 84.90% <84.90%> (ø) |
|
...s/dbs-versionize-derive/src/fields/struct_field.rs | 87.17% <87.17%> (ø) |
|
crates/dbs-versionize-derive/src/lib.rs | 88.57% <88.57%> (ø) |
|
crates/dbs-versionize-derive/src/common.rs | 95.00% <95.00%> (ø) |
|
...s/dbs-versionize-derive/src/fields/enum_variant.rs | 97.19% <97.19%> (ø) |
|
crates/dbs-versionize-derive/src/helpers.rs | 97.96% <97.96%> (ø) |
|
crates/dbs-versionize/src/primitives.rs | 98.16% <98.16%> (ø) |
|
...s-versionize-derive/src/descriptors/struct_desc.rs | 99.00% <99.00%> (ø) |
|
... and 2 more |
:mega: We’re building smart automated test selection to slash your CI/CD build times. Learn more
Great job! I love this solution!
But how about the major version? If major version is different, you will deny to do serde?
But how about the major version? If major version is different, you will deny to do serde?
It is not handled here now, process in the snapshot crate, continue to use VersionManager to manage versions that can be upgraded.
@wllenyj We will migrate all our crates to Kata Containers repo. I will close this one now. And we will help you follow up this PR. Thank you very much.
Enhanced cross-version support.
Reason for This PR
In production use, we usually have multiple release branches, each branch corresponding to a minor version. When we develop between versions, there may be changes to fields of struct. This brings a lot of complexity and maintenance cost to version control.
Description of Changes
Now writing a Versionize derive for a structure can look like this.
or enum:
Advantages:
The code generated by the above example: