-
Notifications
You must be signed in to change notification settings - Fork 7
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
Breaking API check never fails #304
Comments
It seems like you found the fix already, adding |
I did this but it didn't actually make the job fail still |
It does pass now, as the version is correct. Can you point to the invocation which incorrectly passed? |
https://github.com/dart-lang/build/actions/runs/11150849769/job/30992945328?pr=3760 is the job which passes, but should be failing. It should be requiring a breaking release (5.0.0) but I only did a feature release. |
Why should it be failing? The comment says it needs a minor version bump, which was made. What am I missing? |
Oh interesting, it was definitely a breaking change. I widened the return type of a function, so users of that function would be broken. So, I guess the issue is actually that widening return types should be considered breaking and cause a major version. |
@devmil - Widening the return type seems to be a minor breaking change at the moment - should it be a major breaking change instead? |
I agree. I created an issue to look into this |
Widening the type already should lead to a breaking change and looking into the CI run (https://github.com/dart-lang/build/actions/runs/11150849769/job/30992945328?pr=3760) it looks like dart_apitool detected that change as breaking? |
Hm. But the |
Also, I thought |
Ah, I see. The confusion comes probably from the fact that the "type" in the JSON output is only relevant if breaking == "false" and tells if a minor version increase should happen. I will change that so that type contains "major" in that situation which would make much more sense in my opinion |
Sounds good - and the |
['version']['needed'] should already contain that information today Edit: Looking at the generated comment it seems that 4.2 was suggested (as you said and assuming that the needed column is filled with the needed field). Will investigate further |
Yes, the |
So, the problem is that the old version is a pre-release version. In that case there is no major bump requirement for breaking changes (dart_apitool only checks if the new version is equal or higher) |
Hm, that sounds like the API tool it is working correctly after all. The health PR check currently tests against the repository checkout, it's an interesting question if it should test against the latest released version to check if a major version bump is required instead. That would require downloading and unzipping the version from @jakemac53 any opinion for your workflow in the build repo? |
dart_apitool can do that already if the package is on pub.dev so you would just specify the "pub://package/version" Uri as the old package parameter |
The workflow we have been pushing for all dart-lang packages is that the first commit after a release always increases the version and adds a So we should be comparing against the last released version then, yes, and not using whatever the version in the pubspec was at the prior commit (which will usually be some |
I am trying to add the breaking API check here dart-lang/build#3760.
While in the comment it does notice the breaking change, and the job also sees the breaking change, it still passes, and also in the comment it is listed with a green checkmark.
I should be forced to do a breaking release?
The text was updated successfully, but these errors were encountered: