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

New feature: Detect EnumCaseAdded as a BC break #767

Closed
bdsl opened this issue May 18, 2024 · 1 comment · Fixed by #768
Closed

New feature: Detect EnumCaseAdded as a BC break #767

bdsl opened this issue May 18, 2024 · 1 comment · Fixed by #768
Assignees
Milestone

Comments

@bdsl
Copy link
Contributor

bdsl commented May 18, 2024

As far as I can tell this isn't something currently detected, but I think adding a new enum case should be considered a breaking change, as it will break any consuming code that was previously relying on being able to exhaustively handle all cases of an enum.

For instance consuming code will often use match with an enum, which will throw UnhandledMatchError if the enum cases is a new one.

Would people be interested in a PR to implement this check?

@Ocramius
Copy link
Member

Yes please!

bdsl added a commit to bdsl/BackwardCompatibilityCheck that referenced this issue May 19, 2024
bdsl added a commit to bdsl/BackwardCompatibilityCheck that referenced this issue May 19, 2024
bdsl added a commit to bdsl/BackwardCompatibilityCheck that referenced this issue May 19, 2024
bdsl added a commit to bdsl/BackwardCompatibilityCheck that referenced this issue May 19, 2024
bdsl added a commit to bdsl/BackwardCompatibilityCheck that referenced this issue May 19, 2024
bdsl added a commit to bdsl/BackwardCompatibilityCheck that referenced this issue May 19, 2024
bdsl added a commit to bdsl/BackwardCompatibilityCheck that referenced this issue May 19, 2024
bdsl added a commit to bdsl/BackwardCompatibilityCheck that referenced this issue May 19, 2024
Afaik this product is a tool rather than a library, so I'm not sure if
BC breaks on a function are really an issue, but the build is reporting
an unexpected BC break here

https://github.com/Roave/BackwardCompatibilityCheck/actions/runs/9148688556/job/25151720875
bdsl added a commit to bdsl/BackwardCompatibilityCheck that referenced this issue May 19, 2024
Afaik this product is a tool rather than a library, so I'm not sure if
BC breaks on a function are really an issue, but the build is reporting
an unexpected BC break here

https://github.com/Roave/BackwardCompatibilityCheck/actions/runs/9148688556/job/25151720875
bdsl added a commit to bdsl/BackwardCompatibilityCheck that referenced this issue May 19, 2024
Afaik this product is a tool rather than a library, so I'm not sure if
BC breaks on a function are really an issue, but the build is reporting
an unexpected BC break here

https://github.com/Roave/BackwardCompatibilityCheck/actions/runs/9148688556/job/25151720875
bdsl added a commit to bdsl/BackwardCompatibilityCheck that referenced this issue May 19, 2024
bdsl added a commit to bdsl/BackwardCompatibilityCheck that referenced this issue May 19, 2024
Infection detected that these were not needed
bdsl added a commit to bdsl/BackwardCompatibilityCheck that referenced this issue May 19, 2024
bdsl added a commit to bdsl/BackwardCompatibilityCheck that referenced this issue May 19, 2024
Infection detected that these were not needed
bdsl added a commit to bdsl/BackwardCompatibilityCheck that referenced this issue May 19, 2024
bdsl added a commit to bdsl/BackwardCompatibilityCheck that referenced this issue May 19, 2024
bdsl added a commit to bdsl/BackwardCompatibilityCheck that referenced this issue May 19, 2024
bdsl added a commit to bdsl/BackwardCompatibilityCheck that referenced this issue May 19, 2024
Afaik this product is a tool rather than a library, so I'm not sure if
BC breaks on a function are really an issue, but the build is reporting
an unexpected BC break here

https://github.com/Roave/BackwardCompatibilityCheck/actions/runs/9148688556/job/25151720875
bdsl added a commit to bdsl/BackwardCompatibilityCheck that referenced this issue May 19, 2024
bdsl added a commit to bdsl/BackwardCompatibilityCheck that referenced this issue May 19, 2024
Infection detected that these were not needed
bdsl added a commit to bdsl/BackwardCompatibilityCheck that referenced this issue May 19, 2024
Trying to work out whether this is related to the infection check
failure - I haven't been able to reproduce the way its failing on my
local.
bdsl added a commit to bdsl/BackwardCompatibilityCheck that referenced this issue May 19, 2024
bdsl added a commit to bdsl/BackwardCompatibilityCheck that referenced this issue May 21, 2024
bdsl added a commit to bdsl/BackwardCompatibilityCheck that referenced this issue May 21, 2024
bdsl added a commit to bdsl/BackwardCompatibilityCheck that referenced this issue May 21, 2024
bdsl added a commit to bdsl/BackwardCompatibilityCheck that referenced this issue May 21, 2024
bdsl added a commit to bdsl/BackwardCompatibilityCheck that referenced this issue May 21, 2024
bdsl added a commit to bdsl/BackwardCompatibilityCheck that referenced this issue May 21, 2024
bdsl added a commit to bdsl/BackwardCompatibilityCheck that referenced this issue May 21, 2024
bdsl added a commit to bdsl/BackwardCompatibilityCheck that referenced this issue May 21, 2024
bdsl added a commit to bdsl/BackwardCompatibilityCheck that referenced this issue May 22, 2024
Perhaps the semantics are arguable, but I think it's safest to say
making a case no longer internal is a BC break, as it means we no-longer
gurantee to not return it and client code may need to check for it as
part of an exhaustive match.
bdsl added a commit to bdsl/BackwardCompatibilityCheck that referenced this issue May 22, 2024
bdsl added a commit to bdsl/BackwardCompatibilityCheck that referenced this issue May 22, 2024
bdsl added a commit to bdsl/BackwardCompatibilityCheck that referenced this issue May 22, 2024
bdsl added a commit to bdsl/BackwardCompatibilityCheck that referenced this issue May 22, 2024
@Ocramius Ocramius added this to the 8.8.0 milestone May 22, 2024
@Ocramius Ocramius self-assigned this May 22, 2024
@Ocramius Ocramius linked a pull request May 22, 2024 that will close this issue
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants