-
Notifications
You must be signed in to change notification settings - Fork 76
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
blang/semver v4 is released, but go-github-selfupdate depends v3 #31
Comments
Thanks for the report. Which a bug or an enhancement is this? What is a problem when we keep using semver v3? As you pointed, updating semver package version will cause major version update in this package because we're using |
This is the enhancement for users who wants to use the latest version of blang/semver. 1. User can access to new features that may be provided to v4 in the futureCurrently, there are no functional differences between v3.8.0(latest version of v3) and v4.0.0. But in the future, only bug fixes will be provided for v3. 2. v4 is a compatible go module, but v3 is not.Since v3.6.0 blang/semver has included go.mod in its repository, Version validation for incompatible packages introduced in Go1.13 will fail the installation. To support v4, providing the v2 API of go-github-selfupdate is a way to avoid breaking APIs for existing users. However, more effort will be required for future maintenance. What do you think about whether go-github-selfupdate should support blang/semver v4 and how to implement it? |
will revise when resolved: rhysd/go-github-selfupdate#31
Thank you for the detailed explanation. Hmm, I'm actually conservative to break compatibility. If v3 works fine for go-github-selfupdate, I want to keep the version until real-world issue and/or benefit appears since it does not sound urgent. When we need major version update due to some other reason, we can also update version of semver module. Can I ask you your use case of this enhancement? |
Since v4, blang/semver follows the major version strategies of Go modules, and the import path has a v4 suffix. Due to this change, the
selfupdate.UpdateSelf
method is incompatible with v4, because UpdateSelf expects a v3semver.Version
struct as an argument.The structure of
Version
struct has not changed between v3 and v4, so the following workaround is available.However, go-github-selfupdate needs changes to support v4.
I think there are two options: just accept v4 Version as an argument, or define an own
Version
struct so that it does not depend on the version of blang/semver. Either way, it will be breaking changes.The text was updated successfully, but these errors were encountered: