-
Notifications
You must be signed in to change notification settings - Fork 34
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
Add support for go modules #75
Conversation
Signed-off-by: Yuri Shkuro <ys@uber.com>
Signed-off-by: Yuri Shkuro <ys@uber.com>
Signed-off-by: Yuri Shkuro <ys@uber.com>
Signed-off-by: Yuri Shkuro <ys@uber.com>
Signed-off-by: Yuri Shkuro <ys@uber.com>
Codecov Report
@@ Coverage Diff @@
## master #75 +/- ##
=====================================
Coverage 100% 100%
=====================================
Files 26 26
Lines 890 890
=====================================
Hits 890 890 Continue to review full report at Codecov.
|
Signed-off-by: Yuri Shkuro <ys@uber.com>
cc @jpkrohling @objectiser please review |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM. I have one small suggestion about gathering the parent directories containing go sources, but that can be safely ignored.
Makefile
Outdated
@@ -1,11 +1,12 @@ | |||
PROJECT_ROOT=github.com/uber/jaeger-lib | |||
PACKAGES := $(shell glide novendor | grep -v ./thrift-gen/...) | |||
PACKAGES := $(shell go list ./... | grep -v '^github.com/uber/jaeger-lib$$' | sed 's|github.com/uber/jaeger-lib/||g' | sed 's|/.*$$||g' | sort -u | sed 's|^|./|g' | sed 's|$$|/...|g') |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
go list ./... | awk -F\/ 'NR>1 {print "./"$4"/..."}' | sort -u
has the same effect. I find it more readable, but feel free to keep the chained sed if you think it's clearer.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
nice! Sadly, I never learned awk to the point of day-to-day usefulness.
Signed-off-by: Yuri Shkuro <ys@uber.com>
This is going to be a bit problematic:
Go modules requires you to increase the major version and add it to the module path as The go modules wiki contains detailed information about the process: |
Thanks for the reference. I am going to revert the change for now. I think it would be best to combine the switch to go modules with changing the path from uber to jaegertracing, and start that with v1. |
That sounds reasonable to me. IMHO you should also consider using vanity import paths, like |
Agree with everything, except with the vanity import path. |
@jpkrohling care to elaborate? IMHO all major Go projects (or at least many of them) are moving towards vanity imports (k8s, opencensus, opentelemetry to name a few). I've heard arguments like enterprise security making things hard for vanity imports, but proxies should make that much easier. |
I've been bitten by servers that are misconfigured or unavailable before. I'm not sure we in the Jaeger project have the bandwidth to setup/maintain this. |
Well, proxies also help with unavailable packages. Also, import paths can be served using static site hosting (eg. Netlify). I understand the concern, but Go undoubtedly goes into this direction. |
If we have a maintainer that volunteers to set it up and run/maintain, I'm all for it :) |
Resolves #74
-race
go test
(removecover.sh
script)