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

Fix the go modules v2 path #1711

Closed
wants to merge 2 commits into from
Closed

Conversation

ccojocar
Copy link
Contributor

The latest version of the api client cannot be used in a go modules project as a dependency. When running:

go get -u github.com/dexidp/dex@v2.24.0

returns:

go get github.com/dexidp/dex@v2.24.0: github.com/dexidp/dex@v2.24.0: invalid version: module contains a go.mod file, so major version must be compatible: should be v0 or v1, not v2

The go modules v2 should follow the recommendations from https://blog.golang.org/v2-go-modules.

fixes #1710

@sagikazarmark
Copy link
Member

I don't think this is something we want to do right now. Personally I'm not a huge fan of importing this project anywhere. A better solution would be making the api package a module IMHO.

If you absolutely need to import Dex, you can do so by importing it with a specific commit hash.

@ccojocar-bot
Copy link

I don't think this is something we want to do right now. Personally I'm not a huge fan of importing this project anywhere. A better solution would be making the api package a module IMHO.

The api client is useful to register OIDC clients programatically and we have been using since 2 years and now I was trying to upgrade it to a newer version.

If you absolutely need to import Dex, you can do so by importing it with a specific commit hash.

yeah, by commit sha works:

go get -u github.com/dexidp/dex@master
go: downloading github.com/dexidp/dex v0.0.0-20200512115545-709d4169d646
go: github.com/dexidp/dex master => v0.0.0-20200512115545-709d4169d646
go: github.com/golang/protobuf upgrade => v1.4.1
go: google.golang.org/protobuf upgrade => v1.22.0
go: golang.org/x/tools upgrade => v0.0.0-20200513201620-d5fe73897c97
go: golang.org/x/lint upgrade => v0.0.0-20200302205851-738671d3881b
go: downloading golang.org/x/lint v0.0.0-20200302205851-738671d3881b
go: downloading golang.org/x/tools v0.0.0-20200513201620-d5fe73897c97

@ccojocar ccojocar closed this May 14, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Issue with using the client package v2 version in go modules project
3 participants