-
Notifications
You must be signed in to change notification settings - Fork 17.9k
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
x/exp/cmd/gorelease: suggest a minor version increment if requirements increase #37564
Comments
Additionally, The |
I recall there being some discussion about how
|
You could make the same argument about any dependency though.
Upgrading the |
That is fair, and I am not strictly advocating for it being a breaking change, just trying to ensure we agree it is not. I also dislike that the upgrade Go step is not as easy as MVS, because the failure modes mia not be clear to customers, but i guess that is a toolchain issue? For most cases it is pretty easy. My one concern is some customers may not want to upgrade or not be able to, either because of bugs, uncertainty, or restrictive runtimes, like App Engine, that lock customers to a given release. For such cases where upgrade is not feasible, or at least trivial, does this change your calculus? |
I think this makes it more important to encourage module authors to increment the minor version when updating the Using new features in a dependency (whether it's a regular module or the Go language or standard library) means your dependents also need to update. If they can't update their version of that dependency for some reason, it also means they can't update to new versions of your module. |
I should have been more clear, I was (devil's) advocating for a major version bump, not patch or none. I guess I was drawing the compatibility line as: if it compiled yesterday, I upgrade a minor or patch dependency, it should compile today. If anything breaks it is a breaking change, and would need a major version. I think it is fair to exempt the compiler, but I am unclear if users understand/agree or the toolchain will notify them of what to do to resolve the issue. Note: The toolchain warning looks like this:
|
My argument though is that updating a dependency to a new minor version may also require updating its dependencies to new minor versions. For normal module requirements, that happens automatically with MVS. For the |
Ok, I follow your logic: treat the go toolchain as another semver dependency, thus Sorry for the pedantry, mostly wanted to make sure this discussion was had somewhere. |
It's not clear that we will ever make a breaking change. If we do make a breaking change, it's not clear that we will change the major version of the Go release. See discussion at https://go.googlesource.com/proposal/+/refs/heads/master/design/28221-go2-transitions.md . |
Hypothetically, if there ever is an incompatible change to the language, the compiler should still be compatible with code written for older versions of the language. This was the main reason the |
Change https://golang.org/cl/255880 mentions this issue: |
If a module has new requirements compared to the
-base
version, or if any of the minimum required versions have increased beyond their current minor versions,gorelease
should recommend a minor version increment, not a patch version increment.Suppose
example.com/a@v1.0.0
(the base version) requiresexample.com/b@v1.0.0
. If the release version ofexample.com/a
now requiresexample.com/bv1.5.0
, thengorelease
should suggest thatexample.com/a
should be released atv1.1.0
, notv1.0.1
, even if the exported API hasn't changed at all.The text was updated successfully, but these errors were encountered: