Skip to content
This repository has been archived by the owner on May 23, 2024. It is now read-only.

Support Go 1.11 #363

Closed
autodidaddict opened this issue Jan 14, 2019 · 8 comments
Closed

Support Go 1.11 #363

autodidaddict opened this issue Jan 14, 2019 · 8 comments

Comments

@autodidaddict
Copy link

autodidaddict commented Jan 14, 2019

Requirement - what kind of business use case are you trying to solve?

Simple compilation. I cannot compile a service that relies on the Jaeger client.

Problem - what in Jaeger blocks you from solving the requirement?

Use of the old golang.org/x/net/context in transitive dependencies.

For example:

$ go get -u github.com/uber/jaeger-client-go
go build golang.org/x/net/context: no Go files in 

I cannot use go build on Go v1.11 to build any project that relies on the Jaeger client as I cannot download the old golang.org/x/net/context using build tools

Proposal - what do you suggest to solve the problem or improve the existing situation?

Remove the dependency on the deprecated context and ensure that Go 1.11 can build services that use the Jaeger client

Additional Details

$ go build
build(redacted): cannot find module for path golang.org/x/net/context
$ go version
go version go1.11.4 darwin/amd64

require section of go.mod produced by 1.11.4:

require (
	github.com/BurntSushi/toml v0.3.1 // indirect
	github.com/codahale/hdrhistogram v0.0.0-20161010025455-3a0bb77429bd // indirect
	github.com/golang/protobuf v1.2.0
	github.com/gorilla/context v1.1.1 // indirect
	github.com/gorilla/mux v1.6.2
	github.com/opentracing/opentracing-go v1.0.2 // indirect
	github.com/pkg/errors v0.8.0 // indirect
	github.com/pmezard/go-difflib v1.0.0 // indirect
	github.com/spf13/pflag v1.0.3
	github.com/spf13/viper v1.2.1
	github.com/stretchr/testify v1.2.2 // indirect
	github.com/uber-go/atomic v1.3.2 // indirect
	github.com/uber/jaeger-client-go v2.15.0+incompatible
	github.com/uber/jaeger-lib v2.0.0+incompatible // indirect
	go.uber.org/atomic v1.3.2 // indirect
	go.uber.org/multierr v1.1.0 // indirect
	go.uber.org/zap v1.9.1
)
@yurishkuro
Copy link
Member

We have not done any work to support go modules yet. Aside from that fact, I don't think that the ticket description is accurate, since we build Jaeger backend with go 1.11 and the backend itself depends on Jaeger client.

@autodidaddict
Copy link
Author

autodidaddict commented Jan 14, 2019

If you add a dependency on the Jaeger client to a Go module and then attempt to build, it will fail to find the transitive dependency golang.org/x/net from a clean build environment. This dependency can no longer be retrieved via go get because of the redirect from that to godoc.org. This means that without fabricating my dependency structure with hard copies, I cannot take a dependency on this library with Go 1.11

@autodidaddict
Copy link
Author

Put another way, if I manually xcopy all the files from golang.org/x/net/context into my vendor directory and modify the go.mod so it indicates v1.5.0 of jaeger-lib instead of 2.0.0+incompatible, then I can finally compile. My original point stands that, from a clean development machine, I cannot create a new Go module that depends on this client library in Go 1.11 that compiles.

@D1kz
Copy link

D1kz commented Feb 21, 2019

Similar issue I've just encountered. I finally could compile my builds only with v1.5.0 of jaeger-lib

@taisph
Copy link

taisph commented Mar 17, 2019

I had a similar issue.

# go get -u github.com/uber/jaeger-client-go
go: finding github.com/uber/jaeger-client-go v2.15.0+incompatible
go: downloading github.com/uber/jaeger-client-go v2.15.0+incompatible
go: finding github.com/uber/jaeger-lib/metrics latest
go: finding github.com/opentracing/opentracing-go/ext latest
go: finding github.com/opentracing/opentracing-go/log latest
go: finding github.com/opentracing/opentracing-go v1.0.2
go: downloading github.com/opentracing/opentracing-go v1.0.2
go: finding github.com/uber/jaeger-lib v2.0.0+incompatible
go: downloading github.com/uber/jaeger-lib v2.0.0+incompatible
go: finding golang.org/x/net/context latest
go: finding golang.org/x/net latest
go: downloading golang.org/x/net v0.0.0-20190313220215-9f648a60d977
# github.com/uber/jaeger-client-go
../../go/pkg/mod/github.com/uber/[email protected]+incompatible/metrics.go:100:35: too many arguments in call to factory.Namespace
        have (string, nil)
        want (metrics.NSOptions)

Forcing the use of v1.5.0 of jaeger-lib in go.mod seems to work around the problem.

Info:

# go version
go version go1.11.5 linux/amd64

# go.mod require:
require (
	github.com/codahale/hdrhistogram v0.0.0-20161010025455-3a0bb77429bd // indirect
	github.com/davecgh/go-spew v1.1.1 // indirect
	github.com/go-stack/stack v1.8.0 // indirect
	github.com/golang/snappy v0.0.1 // indirect
	github.com/google/go-cmp v0.2.0 // indirect
	github.com/opentracing/opentracing-go v1.0.2
	github.com/pkg/errors v0.8.1 // indirect
	github.com/stretchr/testify v1.3.0 // indirect
	github.com/tidwall/pretty v0.0.0-20180105212114-65a9db5fad51 // indirect
	github.com/uber-go/atomic v1.3.2 // indirect
	github.com/uber/jaeger-client-go v2.15.0+incompatible
	github.com/uber/jaeger-lib v1.5.0+incompatible // indirect
	github.com/xdg/scram v0.0.0-20180814205039-7eeb5667e42c // indirect
	github.com/xdg/stringprep v1.0.0 // indirect
	go.mongodb.org/mongo-driver v1.0.0
	go.uber.org/atomic v1.3.2 // indirect
	golang.org/x/crypto v0.0.0-20190313024323-a1f597ede03a // indirect
	golang.org/x/net v0.0.0-20190313220215-9f648a60d977 // indirect
	golang.org/x/sync v0.0.0-20190227155943-e225da77a7e6 // indirect
	golang.org/x/text v0.3.1-0.20180807135948-17ff2d5776d2 // indirect
)

@tylerchr
Copy link

I ran into this same problem and came up with the same solution (pin to jaeger-lib v1.5.0) before finding this issue.

Adding a go.mod file listing a set of working dependencies could be a low-cost way to resolve this (I just opened an independent issue #382 to address Go modules specifically).

@ghouscht
Copy link

Same issue here.
Additionally I got some funny errors when importing github.com/jagertracing/jaeger-client-go instead of github.com/uber/jaeger-client-go (jagertracing insted of uber in path). But this smells like a go modules problem handling the redirects from uber -> jagertracing or so.

$ go build
go: finding github.com/uber/jaeger-lib/metrics latest
go: finding github.com/uber/jaeger-client-go/internal/throttler/remote latest
go: finding github.com/uber/jaeger-client-go/transport latest
go: finding github.com/uber/jaeger-client-go/log latest
go: finding github.com/uber/jaeger-client-go/thrift-gen/zipkincore latest
go: finding github.com/uber/jaeger-client-go/thrift-gen/sampling latest
go: finding github.com/uber/jaeger-client-go/thrift-gen/jaeger latest
go: finding github.com/uber/jaeger-client-go/utils latest
go: finding github.com/uber/jaeger-client-go/thrift latest
go: finding github.com/uber/jaeger-client-go/internal/baggage latest
go: finding github.com/uber/jaeger-client-go/rpcmetrics latest
go: finding github.com/uber/jaeger-client-go/internal/throttler latest
go: finding github.com/uber/jaeger-client-go/internal/spanlog latest
go: finding github.com/uber/jaeger-client-go/thrift-gen latest
go: finding github.com/uber/jaeger-client-go/internal/baggage/remote latest
go: finding github.com/uber/jaeger-client-go/internal latest
../goroot/pkg/mod/github.com/jaegertracing/[email protected]+incompatible/baggage_setter.go:20:2: use of internal package github.com/uber/jaeger-client-go/internal/baggage not allowed
../goroot/pkg/mod/github.com/jaegertracing/[email protected]+incompatible/config/config.go:27:2: use of internal package github.com/uber/jaeger-client-go/internal/baggage/remote not allowed
../goroot/pkg/mod/github.com/jaegertracing/[email protected]+incompatible/zipkin_thrift_span.go:24:2: use of internal package github.com/uber/jaeger-client-go/internal/spanlog not allowed
../goroot/pkg/mod/github.com/jaegertracing/[email protected]+incompatible/tracer.go:30:2: use of internal package github.com/uber/jaeger-client-go/internal/throttler not allowed
../goroot/pkg/mod/github.com/jaegertracing/[email protected]+incompatible/config/config.go:28:2: use of internal package github.com/uber/jaeger-client-go/internal/throttler/remote not allowed

jfontan added a commit to jfontan/go-mysql-server that referenced this issue Apr 18, 2019
jaeger-client-go is not compatible with jaeger-lib 2.0.0 that was set in
go.mod. Now uses 1.5.0 that is compatible and is the one in pilosa
go.mod.

With this change gitbase is able to use go-mysql-server with go.mod.

This problem is mentioned here:

jaegertracing/jaeger-client-go#363 (comment)

Signed-off-by: Javi Fontan <[email protected]>
@yurishkuro
Copy link
Member

I am going to close this, as I don't see anything related to Go 1.11 in the comments, and we have another ticket #363 for supporting Go modules.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

6 participants