Skip to content

enable cargo-semver-checks, try 2#3586

Merged
davidhewitt merged 2 commits intoPyO3:mainfrom
davidhewitt:semver-checks-v2
Nov 20, 2023
Merged

enable cargo-semver-checks, try 2#3586
davidhewitt merged 2 commits intoPyO3:mainfrom
davidhewitt:semver-checks-v2

Conversation

@davidhewitt
Copy link
Copy Markdown
Member

Closes #2984

Many thanks @obi1kenobi for completing support of #[doc(hidden)] in cargo-semver-checks; I tested on 0.17, 0.18 and 0.19 branches and the good news is that all our releases there were semver compliant 🚀

(I didn't try older branches 😂)

@davidhewitt davidhewitt added the CI-skip-changelog Skip checking changelog entry label Nov 18, 2023
@davidhewitt
Copy link
Copy Markdown
Member Author

Looks like this is behaving as expected; the only question IMO is do we go for 0.21.0-dev or just 0.21.0 in our Cargo.toml files?

@obi1kenobi
Copy link
Copy Markdown
Contributor

Looks like this is behaving as expected; the only question IMO is do we go for 0.21.0-dev or just 0.21.0 in our Cargo.toml files?

From cargo-semver-checks' point of view, those should be the same (if they are not, please let me know or open an issue). So it's entirely your call.

At some point, I'm hoping to have a "proper" PR-oriented cargo-semver-checks action as well. The current one is designed to be put right before cargo publish which is why it treats semver violations as a job failure. A PR-oriented one would compare the target branch to the base branch, not to the previous release, and it would point out the changes that are breaking and/or assign labels to the PR like semver:major so as to allow maintainers to merge breaking changes without bumping the major version.

@davidhewitt
Copy link
Copy Markdown
Member Author

That makes sense, I can see how on a non-release workflow this is still more of a lint. Also I suspect that once I've bumped the version on main, the semver-checks job will never fail again, thus limiting the per-PR feedback we'd get from it?

This will still be immensely helpful on maintenance release PRs to give me confidence that the stuff I've cherry-picked is not semver-breaking!

I'm going to go for 0.21.0-dev, as I like the ceremony of making a version bump at the point of release 😂

@obi1kenobi
Copy link
Copy Markdown
Contributor

Also I suspect that once I've bumped the version on main, the semver-checks job will never fail again, thus limiting the per-PR feedback we'd get from it?

Exactly right! Another thing that would be solved with a PR-centric workflow.

@davidhewitt davidhewitt added this pull request to the merge queue Nov 20, 2023
Merged via the queue into PyO3:main with commit abe518d Nov 20, 2023
@davidhewitt davidhewitt deleted the semver-checks-v2 branch November 20, 2023 08:15
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

CI-skip-changelog Skip checking changelog entry

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants