microservices-demo / user

The users microservice.
http://microservices-demo.github.io/
Apache License 2.0
91 stars 617 forks source link

Newer versions of kit and metadata break build #52

Closed embs closed 7 years ago

embs commented 7 years ago

Recent changes in https://github.com/go-kit/kit/ and https://godoc.org/google.golang.org/grpc/metadata packages break the build.

The final lines for make are these ones:

mkdir -p bin
CGO_ENABLED=0 go build -a -installsuffix cgo -o bin/user main.go
# _/home/embs/Code/weaveworks/common/user
../../weaveworks/common/user/grpc.go:11: undefined: metadata.FromContext
../../weaveworks/common/user/grpc.go:31: undefined: metadata.FromContext
../../weaveworks/common/user/grpc.go:47: undefined: metadata.NewContext
# _/home/embs/Code/microservices-demo/user/api
api/transport.go:42: undefined: "github.com/go-kit/kit/tracing/opentracing".FromHTTPRequest
api/transport.go:48: undefined: "github.com/go-kit/kit/tracing/opentracing".FromHTTPRequest
api/transport.go:54: undefined: "github.com/go-kit/kit/tracing/opentracing".FromHTTPRequest
api/transport.go:60: undefined: "github.com/go-kit/kit/tracing/opentracing".FromHTTPRequest
api/transport.go:66: undefined: "github.com/go-kit/kit/tracing/opentracing".FromHTTPRequest
api/transport.go:72: undefined: "github.com/go-kit/kit/tracing/opentracing".FromHTTPRequest
api/transport.go:78: undefined: "github.com/go-kit/kit/tracing/opentracing".FromHTTPRequest
api/transport.go:84: undefined: "github.com/go-kit/kit/tracing/opentracing".FromHTTPRequest
api/transport.go:90: undefined: "github.com/go-kit/kit/tracing/opentracing".FromHTTPRequest
api/transport.go:96: undefined: "github.com/go-kit/kit/tracing/opentracing".FromHTTPRequest
api/transport.go:96: too many errors
Makefile:90: recipe for target 'build' failed
make: *** [build] Error 2

I've tried tackling these problems in https://github.com/weaveworks/common/pull/54 and https://github.com/microservices-demo/user/pull/51 but wonder if is there a way to use fixed packages versions so the build becomes more tolerant to changes in dependencies interface.

embs commented 7 years ago

I figured out that project path must follow glide conventions in order to the build work.

Should we add to the README

Anyway, I'm closing this issue as updating code syntax is not an impediment to building the project and it seems to be no other reason to updating the mentioned dependencies.