hi! I’m trying to use the latest version of Keto by compiling it, but I keep running into errors wit...
e
hi! I’m trying to use the latest version of Keto by compiling it, but I keep running into errors with Go dependencies, first I just tried `go mod download ; go build`:
Copy code
=> CACHED [2/5] WORKDIR /go/src                                                                                                                               0.0s
 => CACHED [3/5] COPY keto/* /go/src/                                                                                                                          0.0s
 => [4/5] RUN go mod download                                                                                                                                 20.4s
 => ERROR [5/5] RUN go build                                                                                                                                   1.5s
------                                                                                                                                                              
 > [5/5] RUN go build:                                                                                                                                              
#0 1.255 found packages ketoapi (cmd_output.go) and ketoctx (contextualizer.go) in /go/src                                                                          
#0 1.260 contextualizer.go:11:2: no required module provides package <http://github.com/gofrs/uuid;|github.com/gofrs/uuid;> to add it:                                                              
#0 1.260        go get <http://github.com/gofrs/uuid|github.com/gofrs/uuid>
and it doesn’t find this package (and a bunch more), so I figure the go.mod is outdated
so I try using
go mod tidy
and then I get this error:
Copy code
#0 94.24 go: finding module for package <http://github.com/ory/keto/internal/httpclient|github.com/ory/keto/internal/httpclient>
#0 94.27 <http://github.com/ory/keto/proto|github.com/ory/keto/proto> imports
#0 94.27        <http://github.com/ory/keto/cmd/check|github.com/ory/keto/cmd/check>: module <http://github.com/ory/keto@latest|github.com/ory/keto@latest> found (v0.5.2), but does not contain package <http://github.com/ory/keto/cmd/check|github.com/ory/keto/cmd/check>
the proto mod inside keto depends on keto and then some package is missing?
so then I tried doing what the readme says and running
make install
and I get the same error:
Copy code
=> [2/5] RUN apk add --no-cache make build-base bash                                                                                                          8.5s
 => [3/5] WORKDIR /go/src                                                                                                                                      0.1s
 => [4/5] COPY keto/* /go/src/                                                                                                                                 0.3s 
 => ERROR [5/5] RUN make install                                                                                                                               8.7s 
------                                                                                                                                                              
 > [5/5] RUN make install:                                                                                                                                          
#0 0.438 go install -tags sqlite .                                                                                                                                  
#0 1.419 go: downloading <http://google.golang.org/grpc|google.golang.org/grpc> v1.49.0                                                                                                             
#0 2.013 go: downloading <http://google.golang.org/protobuf|google.golang.org/protobuf> v1.28.1                                                                                                         
#0 2.522 go: downloading <http://golang.org/x/net|golang.org/x/net> v0.0.0-20220622184535-263ec571b305                                                                                        
#0 2.529 go: downloading <http://google.golang.org/genproto|google.golang.org/genproto> v0.0.0-20220622171453-ea41d75dfa0f
#0 3.623 go: downloading <http://github.com/golang/protobuf|github.com/golang/protobuf> v1.5.2
#0 3.828 go: downloading <http://golang.org/x/sys|golang.org/x/sys> v0.0.0-20220622161953-175b2fd9d664
#0 4.635 go: downloading <http://golang.org/x/text|golang.org/x/text> v0.3.7
#0 7.884 found packages ketoapi (cmd_output.go) and ketoctx (contextualizer.go) in /go/src
#0 7.884 contextualizer.go:11:2: no required module provides package <http://github.com/gofrs/uuid;|github.com/gofrs/uuid;> to add it:
#0 7.884        go get <http://github.com/gofrs/uuid|github.com/gofrs/uuid>
oh shit I hadn’t noticed there is also a build image..
nope, build image also fails, same error
Copy code
=> ERROR [builder 10/10] RUN go build -buildvcs=false -tags sqlite -o /usr/bin/keto .                                                                         8.8s
------
 > [builder 10/10] RUN go build -buildvcs=false -tags sqlite -o /usr/bin/keto .:
#0 0.909 go: downloading <http://google.golang.org/grpc|google.golang.org/grpc> v1.49.0
#0 1.836 go: downloading <http://golang.org/x/net|golang.org/x/net> v0.0.0-20220622184535-263ec571b305
#0 1.844 go: downloading <http://google.golang.org/genproto|google.golang.org/genproto> v0.0.0-20220622171453-ea41d75dfa0f
#0 3.012 go: downloading <http://golang.org/x/sys|golang.org/x/sys> v0.0.0-20220622161953-175b2fd9d664
#0 3.808 go: downloading <http://golang.org/x/text|golang.org/x/text> v0.3.7
#0 8.095 found packages ketoapi (cmd_output.go) and ketoctx (contextualizer.go) in /go/src/github.com/ory/keto
#0 8.096 contextualizer.go:11:2: no required module provides package <http://github.com/gofrs/uuid;|github.com/gofrs/uuid;> to add it:
#0 8.096        go get <http://github.com/gofrs/uuid|github.com/gofrs/uuid>
weird, it does build if I do it on macos, for some reason it only fails in docker
oh shit, ok I found the problem, I wasn’t copying the dotfiles, and there was something important in there apparently