hydra-client-go icon indicating copy to clipboard operation
hydra-client-go copied to clipboard

Version 2 not installable/published correctly

Open apexskier opened this issue 3 years ago • 8 comments

Preflight checklist

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

apexskier avatar Nov 02 '22 16:11 apexskier

Same issue here

wireva avatar Nov 04 '22 20:11 wireva

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)

apexskier avatar Nov 04 '22 21:11 apexskier

ack

aeneasr avatar Nov 05 '22 05:11 aeneasr

https://github.com/ory/sdk/pull/225

aeneasr avatar Nov 05 '22 06:11 aeneasr

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?

apexskier avatar Nov 07 '22 21:11 apexskier

We still need to release a new version of ory hydra

aeneasr avatar Nov 07 '22 22:11 aeneasr

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

image

JeffLabonte avatar Jun 05 '24 00:06 JeffLabonte

That is correct!

aeneasr avatar Jun 05 '24 06:06 aeneasr