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

Go module compatibility #967

Open
linzhp opened this issue Mar 11, 2021 · 2 comments
Open

Go module compatibility #967

linzhp opened this issue Mar 11, 2021 · 2 comments

Comments

@linzhp
Copy link
Contributor

linzhp commented Mar 11, 2021

Go modules requires all v2 and later major versions to have import paths ending with /v2 etc: https://blog.golang.org/v2-go-modules.

However, f2aed9e added go.mod file to this repository without changing the import path. In addition, the tags should be in the format of v4.0.1. As a result, neither Go proxy and or go get is able to find the semver, and still resolves to psuedo-version:

$ go get github.com/bazelbuild/buildtools@4.0.1
go: github.com/bazelbuild/buildtools 4.0.1 => v0.0.0-20210227132407-f2aed9ee205d
@pmbethe09
Copy link
Member

interesting. So as I understand it, a Go module version, like v2 or v4 indicates a breaking API change to the previous version.
buildifier/buildozer has had no such change. So as far as Go is concerned, our API is still a v1.

We have been using release tags like 4.0.0 to lockstep with https://github.com/bazelbuild/bazel but are not the same as Go module tags.

@vladmos I am not sure what the right way forward is.

@vladmos
Copy link
Member

vladmos commented Mar 11, 2021

I think there have been some breaking changes, but they have nothing to do with the binaries versions (that just mach Bazel versions now). It's possible to have a breaking change between versions, for example, 4.1.2. and 4.1.3. Maybe it makes sense to version the current state as "v1" and then bump in independently of binaries/Bazel versions when an incompatible change actually happens?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants