-
Notifications
You must be signed in to change notification settings - Fork 367
xtask: Add SemVer checks for esp-rom-sys
#4584
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
base: main
Are you sure you want to change the base?
Conversation
6ace2a5 to
8fc7a80
Compare
|
FYI, there is |
|
I don't mind doing this, but it's worth mentioning that what the release tool considers Major/Minor/Patch don't actually match semver's idea of "0.x -> 0.x+1 is a major bump". |
I tested it (with the same change in Finished `dev` profile [unoptimized + debuginfo] target(s) in 1.01s
Generated /Users/jurajsadel/esp-rs/esp-hal/target/xtensa-esp32-none-elf/doc/esp_hal.json
Checking <unknown> v1.0.0-rc.0 -> v1.0.0 (major change)
Checked [ 0.000s] 0 checks: 0 pass, 178 skip
Summary no semver update required
Finished [ 0.204s] <unknown>So, we need to re-generate the baselines for - pub fn new(uart: impl Instance + 'd, config: Config) -> Result<Self, ConfigError> {
+ pub fn new1(uart: impl Instance + 'd, config: Config) -> Result<Self, ConfigError> {and ran Finished `dev` profile [unoptimized + debuginfo] target(s) in 1.01s
Generated /Users/jurajsadel/esp-rs/esp-hal/target/xtensa-esp32-none-elf/doc/esp_hal.json
Checking <unknown> v1.0.0 -> v1.0.0 (no change; assume patch)
Checked [ 0.081s] 165 checks: 164 pass, 1 fail, 0 warn, 13 skip
--- failure inherent_method_missing: pub method removed or renamed ---Finished `dev` profile [unoptimized + debuginfo] target(s) in 0.15s
Generated /Users/jurajsadel/esp-rs/esp-hal/target/xtensa-esp32s3-none-elf/doc/esp_rom_sys.json
Checking <unknown> v0.1.3 -> v0.1.3 (no change; assume minor)
Checked [ 0.023s] 140 checks: 139 pass, 1 fail, 0 warn, 38 skip
--- failure function_missing: pub fn removed or renamed ---So, it should be working correctly (with re-generated baseline for |
|
Is anything else needed here, please? |
Can you add a test for this logic within the xtask? This kind of information is forgotten quickly, best to have the test there to enforce that how it behaves now is correct. |
MabezDev
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'd like to see a test for the amount bump on packages that are stable and those that are not. Please also address @bjoernQ's comment here.
8fc7a80 to
5fb9dec
Compare
5fb9dec to
48b9ce8
Compare
48b9ce8 to
ccb4655
Compare
| } | ||
|
|
||
| #[test] | ||
| fn forever_unstable_downgrades_major_to_minor() { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This test actually gives some insight to my original request.
What does Minor mean here?
If the package is x.y.z, where x < 1 does minor bump refer to y or z?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It refers to y.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Then I think it's wrong, because when it comes to executing the plan we'll bail: https://github.com/esp-rs/esp-hal/pull/4584/files#diff-9997b515b11572bd537642c3209a3536024714fe89ca34421bb69cdeb6db3d24R68-R73
forever unstable should only receive patch releases (I guess we need to document this somewhere)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I might be missing something here but how do we want to deal with breaking changes in esp-rom-sys if only patch release is valid?
This might be a bit of a hacky solution, but I tried to convince
cargo-semver-checksthatesp-rom-sysis not intended to ever reach 1.0, and I failed.To test this, I changned a pub fn name in
esp-rom-sys/src/rom/crc.rs:Ran
cargo xrelease plan esp-rom-sys --allow-non-main:Is the reason for the "hacky" solution.
The final
.jsonc:{ "base": "esp-rom-sys-semver", "packages": [ { "package": "esp-metadata-generated", "semver_checked": false, "current_version": "0.3.0", "new_version": "0.4.0", "tag_name": "esp-metadata-generated-v0.4.0", "bump": "Minor" }, { "package": "esp-rom-sys", "semver_checked": true, "current_version": "0.1.3", "new_version": "0.2.0", "tag_name": "esp-rom-sys-v0.2.0", "bump": "Minor" } ] }closes #4489