gnostic: Error parsing go.mod module declares its path as: github.com/google/gnostic but was required as: github.com/googleapis/gnostic
Hi,
the recent change of the module name (from googleapis
to google
) causes the go get -u ./...
command to fail in our project where gnostic
is listed as an indirect dependency.
go get: github.com/googleapis/gnostic@v0.5.6: parsing go.mod:
module declares its path as: github.com/google/gnostic
but was required as: github.com/googleapis/gnostic
https://github.com/google/gnostic/pull/259
Manually changing the name and version in the mod file doesn’t help.
Is there a recommended smooth update path?
About this issue
- Original URL
- State: open
- Created 3 years ago
- Reactions: 41
- Comments: 15
Commits related to this issue
- Update modules and tidy. Stumbled onto this: https://github.com/google/gnostic/issues/262 when running `go get -u .`, so updated packages with `go get` separately and tidy in the end — committed to utilitywarehouse/semaphore-policy by ffilippopoulos 3 years ago
- Update k8s libs We cannot update all, because of the gnostic bug: https://github.com/google/gnostic/issues/262, but we can update the k8s deps at least — committed to utilitywarehouse/kube-applier by george-angel 3 years ago
- Update k8s libs (#257) We cannot update all, because of the gnostic bug: https://github.com/google/gnostic/issues/262, but we can update the k8s deps at least — committed to utilitywarehouse/kube-applier by george-angel 3 years ago
- Update dependencies and related tooling - Add make targets to easily update dependencies - Add replace directive to work around gnostic upgrade issue - See https://github.com/google/gnostic/issues/... — committed to djaglowski/opentelemetry-log-collection by djaglowski 2 years ago
- Update dependencies and related tooling (#409) - Add make targets to easily update dependencies - Add replace directive to work around gnostic upgrade issue - See https://github.com/google/gnosti... — committed to open-telemetry/opentelemetry-log-collection by djaglowski 2 years ago
- Update dependencies and related tooling (#409) - Add make targets to easily update dependencies - Add replace directive to work around gnostic upgrade issue - See https://github.com/google/gnostic/... — committed to jsirianni/opentelemetry-log-collection by djaglowski 2 years ago
- update all dependencies (#248) the background to this change is that we are preparing to update feed to the networking/v1 Ingress API (from the extensions/v1beta1 API that was previously used, and is... — committed to sky-uk/feed by aecay 2 years ago
Not for me
There isn’t a good workaround at the moment for renaming GitHub repositories without breaking Go module users.
I suggest rolling back the name change until https://github.com/golang/go/issues/26904 and/or https://github.com/golang/go/issues/30831 is fixed in the Go toolchain, or moving the repository back to its original name and starting a new (separate) repository for the
github.com/google/gnostic
path.Depending on your product build requirements you cannot simply update go just because some module decided to break its import path, and this change has already propagated into other modules depending on it, so projects end up in a dependency hell. This is exactly I was warned of: go modules not being mature and go being not ripe for productivity with lots of complex dependencies. I have to admit: the critics are right on spot here.
thanks, I add this to replaces : github.com/googleapis/gnostic v0.5.6 => github.com/googleapis/gnostic v0.5.5. the error went away.
The issue goes away when upgrading to go 1.17.3, at least for me.
The error goes away with the
replace github.com/googleapis/gnostic v0.5.6 => github.com/googleapis/gnostic v0.5.5
but I seem to reach other issues when I roll back the gnostic version