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

Version 2 not installable/published correctly #16

Open
5 of 6 tasks
apexskier opened this issue Nov 2, 2022 · 8 comments · Fixed by ory/sdk#225
Open
5 of 6 tasks

Version 2 not installable/published correctly #16

apexskier opened this issue Nov 2, 2022 · 8 comments · Fixed by ory/sdk#225
Labels
bug Something is not working.

Comments

@apexskier
Copy link

apexskier commented Nov 2, 2022

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

module github.com/ory/hydra-client-go
to github.com/ory/hydra-client-go/v2

Reproducing the bug

cameron@...
❯ go get -u github.com/ory/hydra-client-go@v2.0.1
go get: github.com/ory/hydra-client-go@v2.0.1: 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 apexskier added the bug Something is not working. label Nov 2, 2022
@niwla23
Copy link

niwla23 commented Nov 4, 2022

Same issue here

@apexskier
Copy link
Author

apexskier commented Nov 4, 2022

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)

@aeneasr
Copy link
Member

aeneasr commented Nov 5, 2022

ack

aeneasr added a commit to ory/sdk that referenced this issue Nov 5, 2022
@aeneasr
Copy link
Member

aeneasr commented Nov 5, 2022

ory/sdk#225

aeneasr added a commit to ory/sdk that referenced this issue Nov 5, 2022
@apexskier
Copy link
Author

This doesn't appear fixed? Both project go.mod files still are missing v2 suffixes.

module github.com/ory/hydra-client-go
, https://github.com/ory/sdk/blob/5711942bbd989c6b6d82ec27a00bd63ebbe19649/clients/hydra/go/go.mod#L1?

@aeneasr
Copy link
Member

aeneasr commented Nov 7, 2022

We still need to release a new version of ory hydra

@aeneasr aeneasr reopened this Nov 10, 2022
@JeffLabonte
Copy link

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

@aeneasr
Copy link
Member

aeneasr commented Jun 5, 2024

That is correct!

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

Successfully merging a pull request may close this issue.

4 participants