You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
If the module is version v2 or higher, the major version of the module must be included as a /vN at the end of the module paths used in go.mod files (e.g., module github.com/my/mod/v2, require github.com/my/mod/v2 v2.0.1)
It seem this is not followed and therefore go mod fails to pick up the new major version:
$ GOPROXY="direct" go list -m --versions github.com/rabbitmq/cluster-operator/v2
go: loading module retractions for github.com/rabbitmq/cluster-operator/[email protected]: version "v2.4.0" invalid: go.mod has non-.../v2 module path "github.com/rabbitmq/cluster-operator" (and .../v2/go.mod does not exist) at revision v2.4.0
To Reproduce
go list -m --versions github.com/rabbitmq/cluster-operator
go list -m --versions github.com/rabbitmq/cluster-operator/v2
We cannot go higher as v2.3.0 pulls in new k8s and controller runtime
versions we are not compatible with yet.
Also we cannot point to v2.2.0 directly as they are not properly
releasing the v2 versions. See rabbitmq/cluster-operator#1407
Looks like we missed updating the go.mod when we created a new major. In fairness, I didn't expect people to import our code 😅 Thank you for reporting this!
Describe the bug
The v2.x.x versions cannot be imported to another go project.
The https://github.com/golang/go/wiki/Modules#semantic-import-versioning states that:
It seem this is not followed and therefore go mod fails to pick up the new major version:
To Reproduce
Expected behavior
v2 versions are listed
Screenshots
N/A
Version and environment information
N/A
Additional context
We are importing this operator in https://github.com/openstack-k8s-operators/infra-operator
The text was updated successfully, but these errors were encountered: