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

Install: Building from Source Docs Broken #545

Closed
c-kruse opened this issue Apr 10, 2021 · 1 comment · Fixed by #548
Closed

Install: Building from Source Docs Broken #545

c-kruse opened this issue Apr 10, 2021 · 1 comment · Fixed by #548

Comments

@c-kruse
Copy link

c-kruse commented Apr 10, 2021

Describe the bug

The Building from Source instructions do not work as-is.

  • go get -d -u github.com/ory/keto fails. It appears to be related to github.com/ory/x/viperx no longer existing in the latest version of https://github.com/ory/x. This feels like it may be an oversight in the versioning scheme of https://github.com/ory/x, but its README does warn of this.
  • After circumventing this (by removing the -u flag) github.com/ory/keto is still absent from $GOPATH/src. As of go 1.16 module-aware mode is the default. go get -d -u github.com/ory/keto no longer downloads the source to $GOPATH/src unless you overwrite GO111MODULE to auto or off.

Reproducing the bug

Steps to reproduce the behavior:

Running through instructions here: https://github.com/ory/keto/blob/0ac4fe1667ee1edd133fe3f117e204e3144f6c78/docs/docs/install.md#building-from-source

Server logs

~ docker run -it golang:1.16.3-buster
root@bb7f6028a45a:/go# go get -d -u github.com/ory/keto
go: downloading github.com/ory/keto v0.5.2
go: downloading github.com/ory/x v0.0.109
...
github.com/ory/keto imports
	github.com/ory/keto/cmd imports
	github.com/ory/x/viperx: cannot find module providing package github.com/ory/x/viperx
go: downloading github.com/segmentio/analytics-go v1.2.0

root@bb7f6028a45a:/go# go get -d github.com/ory/keto
root@bb7f6028a45a:/go# ls src/
root@bb7f6028a45a:/go# GO111MODULE=off go get -d github.com/ory/keto
cannot find package "github.com/cenkalti/backoff/v3" in any of:
	/usr/local/go/src/github.com/cenkalti/backoff/v3 (from $GOROOT)
	/go/src/github.com/cenkalti/backoff/v3 (from $GOPATH)
root@bb7f6028a45a:/go# ls $GOPATH/src/github.com/ory/
analytics-go  dockertest  graceful  herodot  jsonschema  keto  x
root@bb7f6028a45a:/go/src/github.com/ory/keto# cd $GOPATH/src/github.com/ory/keto/
root@bb7f6028a45a:/go/src/github.com/ory/keto# git rev-parse HEAD
0ac4fe1667ee1edd133fe3f117e204e3144f6c78

Server configuration

Expected behavior

Install documentation would run for the default go installation.

Environment

  • Version: N/A - latest
  • Environment: MacOS 10.15.7 and Docker golang:1.16.3-buster
  • Go: go1.16.3 darwin/amd64 and go1.16.3 linux/amd64

Additional context

My suggestion: update the docs to ask folks to just clone the repo and run make install. Using this approach I had no problems.

@zepatrik
Copy link
Member

Thanks, adapted the steps 👍

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 a pull request may close this issue.

2 participants