Skip to content
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

Add cargo-semver-checks job to CI #1007

Closed
wants to merge 2 commits into from

Conversation

syrtcevvi
Copy link
Contributor

Close #963

Adds the semver-checks as a separate job, runs on stable latest rust

@teloxidebot
Copy link
Collaborator

r? @WaffleLapkin

(teloxidebot has picked a reviewer for you, use r? to override)

@teloxidebot teloxidebot added the S-waiting-on-review Status: Awaiting review from the assignee label Feb 9, 2024
@syrtcevvi
Copy link
Contributor Author

So, we already have 8 major checks failed

uses: obi1kenobi/cargo-semver-checks-action@v2
with:
feature-group: only-explicit-features
features: full
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please add a newline at the end

@WaffleLapkin
Copy link
Member

I think most of the fails are "breaking changes we wanted to make". The exceptions are:

  1. auto_trait_impl_removed — auto traits should be implemented for polling stuff
  2. 65f693b added a private field instead of a public one

What is the workflow that semver-checks proposes in such cases?...

@syrtcevvi
Copy link
Contributor Author

Idk :)

"..understand and forgive".

Needs some investigation

@WaffleLapkin
Copy link
Member

So, according to the author on mastadon (see the replies) this mode of using с-s-c is not supported (yet). We'll have to resort to running it before release (can this be at least partly automated?).

@syrtcevvi can you try looking into the unintentional breakage (fixing or at least opening issues)?

@obi1kenobi
Copy link

👋 cargo-semver-checks author here! Ping me anytime if you have questions or if anything doesn't work as well as it should.

65f693b added a private field instead of a public one

Just a note that the change there would still be breaking even if the field was public. The issue is that the struct could previously be constructed with a literal like so VideoChatEnded {} and adding any kind of field to it will break that.

It's usually a good idea to mark pub structs as #[non_exhaustive] to prevent them being constructed with literals even when none of their fields are private. Once a pub exhaustive struct has been added to the public API, any of these changes (including making it #[non_exhaustive]) are major and breaking.

@WaffleLapkin
Copy link
Member

@obi1kenobi yeah, I know. We don't add #[non_exhaustive] because we need to do breaking changes on API updates anyway for other reasons, so it's not a big problem. But thanks for the note :^)

@WaffleLapkin WaffleLapkin added this to the v0.13.0 milestone Feb 13, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
S-waiting-on-review Status: Awaiting review from the assignee
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Add cargo-semver-checks to CI checks
4 participants