-
Notifications
You must be signed in to change notification settings - Fork 377
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
Enable Go Modules #1400
Enable Go Modules #1400
Conversation
048ff04
to
71f8784
Compare
|
A few questions before looking at this in detail... The main question is how/whether this deals with the primary problem we encountered on the last few iterations of looking into dependency management, which is that non-Go files are not dependency-managed. For example: do imported The other questions are
|
Your question in order:
|
Ah, number 1 isn't quite my question. I understand how IIRC the problems were roughly:
Maybe the problem has been fixed since I looked at this in September? |
That is an interesting question... I don't have the full answer but here's an initial stab:
|
OK, so it looks like we're currently OK for But are there any other non-Go files we use in (say) the integration test scripts? I guess if we get a clean Travis build then maybe not. (But if there are, then we hit the problem I think I encountered last time : Some other musings:
I think this is all worth wider discussion with the rest of the team in person – but it does look more hopeful than the last few times round the loop ( (By the way, my previous experiment with Go modules is at https://github.com/daviddrysdale/trillian/commits/mod – might be worth a compare/contrast against this PR.) |
I don't think we need to use fancy version paths to refer to things in the module store. That's what Getting rid of The not breaking ct-go check will be an interesting point for discussion.
|
|
Shall we close this and reopen on our 6 monthly "what are go modules doing today" quest? |
@paulmattei - Can we tag this and put it in some sort of backlog / code cleanup / fixit week bucket? |
Modules is a special case as the language support is still somewhat in flux. |
@Martin2112 Are there any language support features we are blocked on? Those might be nice gating mechanism. |
Last time we said 1.12 hadn't been out long enough. There could still be changes during the 1.12.x releases I think. Is that right @daviddrysdale ? |
I think the module stuff has been stable since 1.12 and 1.11.4 (but the |
Codecov Report
@@ Coverage Diff @@
## master #1400 +/- ##
==========================================
+ Coverage 68.46% 68.53% +0.06%
==========================================
Files 104 103 -1
Lines 8940 8898 -42
==========================================
- Hits 6121 6098 -23
+ Misses 2216 2199 -17
+ Partials 603 601 -2
Continue to review full report at Codecov.
|
go mod init go build ./... go get github.com/golang/mock@v1.1.1 go get github.com/golang/protobuf/protoc-gen-go@master go get github.com/coreos/etcd@v3.3.7 go get github.com/ugorji/go/codec@bdcc60b419d136a85cdf2e7cbcac34b3f1cd6e57 go mod tidy go test all
* Add pkg/mod to build cache * Use go install * Use go get -d in non-module mode go get github.com/golang/mock/gomock go get github.com/grpc-ecosystem/grpc-gateway/protoc-gen-grpc-gateway@HEAD go get github.com/golangci/golangci-lint/cmd/golangci-lint@HEAD go get github.com/google/certificate-transparency-go/...@Head go get github.com/letsencrypt/pkcs11key@HEAD
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.
As discussed, I think we now need this to unblock the skylog work.
echo "Checking that generated files are the same as checked-in versions." | ||
git diff --exit-code -- ':!*.pb.go' ':!*_string.go' | ||
git diff --exit-code -- ':!*.pb.go' ':!*_string.go' '!go.*' |
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.
I couldn't quickly find a spec for this path expression. Just to double check, should there not be a colon before the exclamation mark?
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.
Sharp eye
I don't see any reference to a colon here:
https://git-scm.com/docs/gitignore#_pattern_format
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.
That's because this is a pathspec, not a gitignore pattern. The pathspec added here won't work as expected without a colon added, since that's necessary for !
to be interpreted as "exclude".
Go Modules now has a way to pin versions of tools so I thought I'd give things a spin. So far things seem to be working reasonably well.
Checklist