Version 2 not installable/published correctly
Preflight checklist
- [X] I could not find a solution in the existing issues, docs, nor discussions.
- [X] I agree to follow this project's Code of Conduct.
- [X] I have read and am following this repository's Contribution Guidelines.
- [ ] This issue affects my Ory Network project.
- [x] I have joined the Ory Community Slack.
- [X] I am signed up to the Ory Security Patch Newsletter.
Describe the bug
Version 2 of this package is not installable, as it's not published according to go's requirements (https://go.dev/blog/v2-go-modules).
...major version of a module must have a different module path than the previous version. Starting with v2, the major version must appear at the end of the module path (declared in the module statement in the go.mod file).
I think the fix will be as simple as updating the module in https://github.com/ory/hydra-client-go/blob/f558e85344c8c9ee053662f40f42fecc85dc3488/go.mod#L1 to github.com/ory/hydra-client-go/v2
Reproducing the bug
cameron@...
❯ go get -u github.com/ory/[email protected]
go get: github.com/ory/[email protected]: invalid version: module contains a go.mod file, so module path must match major version ("github.com/ory/hydra-client-go/v2")
↩ 1 (ERROR)
cameron@...
❯ go get -u github.com/ory/hydra-client-go/v2
go get: module github.com/ory/hydra-client-go@upgrade found (v1.11.8), but does not contain package github.com/ory/hydra-client-go/v2
↩ 1 (ERROR)
Relevant log output
No response
Relevant configuration
No response
Version
Upgrading from v1.11.8 to v2.0.1
On which operating system are you observing this issue?
macOS
In which environment are you deploying?
Kubernetes
Additional Context
No response
Same issue here
FYI, a workaround is to install by SHA, instead of by version. You can grab the sha associated with the release
e.g.
go get -u github.com/ory/hydra-client-go@76cf2d374d54a15b27ea0d7f9570069ceed30abc
results in a diff of
- github.com/ory/hydra-client-go v1.11.8
+ github.com/ory/hydra-client-go v1.11.9-0.20221027120355-76cf2d374d54
(the version being 1.11.9 is expected, as go's basically saying it's the next greatest release, I think)
ack
https://github.com/ory/sdk/pull/225
This doesn't appear fixed? Both project go.mod files still are missing v2 suffixes. https://github.com/ory/hydra-client-go/blob/f558e85344c8c9ee053662f40f42fecc85dc3488/go.mod#L1, https://github.com/ory/sdk/blob/5711942bbd989c6b6d82ec27a00bd63ebbe19649/clients/hydra/go/go.mod#L1?
We still need to release a new version of ory hydra
I believe they did not communicate it. Their documentation still gives the wrong string that gives 1.18.
If you want to install the latest version, I figured out in the code they changed the package's name to the following: github.com/ory/hydra-client-go/v2.
go get github.com/ory/hydra-client-go/v2
That is correct!