hydra: Go SDK is not "go get"-able
Describe the bug
When implementing a Hydra login/consent provider, I’d love to have a small Hydra Go SDK that’s go get-able in a simple way without having to depend on the entire Hydra project and all its dependencies.
From what I can tell from the docs, I’m supposed to be able to run go get -u -d github.com/ory/hydra/sdk/go/.... This gives the following error message:
% go get -u -d github.com/ory/hydra/sdk/go/...
go: github.com/go-resty/resty@v1.12.0: parsing go.mod: unexpected module path "gopkg.in/resty.v1"
go: error loading module requirements
I see something similar has been reported before in #1388, and it was resolved with a commit to some docs implying the go get command I ran above.
To Reproduce
- Start a new Go project using Go modules (outside of
$GOPATH) by runninggo mod init github.com/myuser/myproject - Install the Hydra Go SDK by running
go get -u -d github.com/ory/hydra/sdk/go/... - Observe an error message trying to resolve a Hydra Go SDK dependency.
Expected behavior
I was hoping to get a minimal dependency on the Swagger-generated Go-SDK in sdk/go/hydra/. Right now I’m workarounding it by just pulling in the entire Hydra project (go get github.com/ory/hydra) but this pulls in a huge host of dependencies that are not in use by the Go SDK.
Version:
- Environment: Locally using Go 1.12.4 (darwin/amd64)
- Version 1.0.0-rc.11
About this issue
- Original URL
- State: closed
- Created 5 years ago
- Comments: 53 (27 by maintainers)
Commits related to this issue
- sdk/go: Add go.mod definition in sdk directory Closes #1422 Signed-off-by: aeneasr <aeneas@ory.sh> — committed to ory/hydra by aeneasr 5 years ago
- sdk/go: Add go.mod definition in sdk directory Closes #1422 Signed-off-by: aeneasr <aeneas@ory.sh> — committed to ory/hydra by aeneasr 5 years ago
- sdk/go: Add go.mod definition in sdk directory Closes #1422 Signed-off-by: aeneasr <aeneas@ory.sh> — committed to ory/hydra by aeneasr 5 years ago
- sdk/go: Add go.mod definition in sdk directory Closes #1422 Signed-off-by: aeneasr <aeneas@ory.sh> — committed to ory/hydra by aeneasr 5 years ago
- sdk/go: Add go.mod definition in sdk directory (#1425) Closes #1422 Signed-off-by: aeneasr <aeneas@ory.sh> — committed to ory/hydra by aeneasr 5 years ago
I will try to update the docs soon to make this process less painful!
I hate go modules… Thank you for the detailed report, I will try to get to the bottom of this.