-
Notifications
You must be signed in to change notification settings - Fork 364
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? |
| } | ||
| } | ||
|
|
||
| let forever_unstable = package |
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.
not necessarily something which needs to be done in this PR but we could have a forever_unstable() method on Package - we now have this piece of code duplicated
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.
imo this should be done here, as its the first copy of the original. Let's refactor this now.
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
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