-
Notifications
You must be signed in to change notification settings - Fork 1.5k
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
Use go workspaces to simplify intermodule deps #5993
Conversation
This is still a draft as I'm figuring out what needs to change in terms of CI. Also, I would like to have a word from @bryan-aguilar on what we would need in terms of tooling. |
Codecov ReportBase: 91.82% // Head: 91.95% // Increases project coverage by
Additional details and impacted files@@ Coverage Diff @@
## main #5993 +/- ##
==========================================
+ Coverage 91.82% 91.95% +0.13%
==========================================
Files 217 217
Lines 13337 13319 -18
==========================================
+ Hits 12247 12248 +1
+ Misses 861 842 -19
Partials 229 229
Help us with your feedback. Take ten seconds to tell us how you rate us. Have a feature suggestion? Share it here. ☔ View full report at Codecov. |
It's been a little while since I dug into As a note, the initial Again, It's been a while since I've done digging into the |
@jpkrohling @bryan-aguilar while back, @codeboten shared this golang blogpost with me https://go.googlesource.com/proposal/+/master/design/45713-workspace.md#preventing-files-from-being-checked-in-to-repositories I think their suggestion is different, not sure how do they envision go workspaces to work. |
That's not the case. I don't think we need that.
I wasn't able to find anything authoritative around whether we should or not check in the go.work file, but I found this GitHub issue: golang/go#53502 Apparently, our case is one that would justify checking in the go.work file: a single git repository with multiple modules. |
That's the proposal @bryan-aguilar linked in his comment. |
I was able to positively confirm that all modules had some effect when added to the go.work. For instance: ``` $ make install-tools cd ./internal/tools && go install github.com/client9/misspell/cmd/misspell cd ./internal/tools && go install github.com/golangci/golangci-lint/cmd/golangci-lint no required module provides package github.com/golangci/golangci-lint/cmd/golangci-lint; to add it: go get github.com/golangci/golangci-lint/cmd/golangci-lint make: *** [Makefile:130: install-tools] Error 1 $ go work use internal/tools/ $ make install-tools cd ./internal/tools && go install github.com/client9/misspell/cmd/misspell cd ./internal/tools && go install github.com/golangci/golangci-lint/cmd/golangci-lint cd ./internal/tools && go install github.com/google/addlicense cd ./internal/tools && go install github.com/ory/go-acc cd ./internal/tools && go install github.com/pavius/impi/cmd/impi cd ./internal/tools && go install github.com/tcnksm/ghr cd ./internal/tools && go install github.com/wadey/gocovmerge cd ./internal/tools && go install go.opentelemetry.io/build-tools/checkdoc cd ./internal/tools && go install go.opentelemetry.io/build-tools/semconvgen cd ./internal/tools && go install golang.org/x/exp/cmd/apidiff cd ./internal/tools && go install golang.org/x/tools/cmd/goimports cd ./internal/tools && go install github.com/jcchavezs/porto/cmd/porto cd ./internal/tools && go install go.opentelemetry.io/build-tools/multimod ``` Fixes open-telemetry#5991 Signed-off-by: Juraci Paixão Kröhling <juraci@kroehling.de>
Signed-off-by: Juraci Paixão Kröhling <juraci@kroehling.de>
Signed-off-by: Juraci Paixão Kröhling <juraci@kroehling.de>
20ecdf8
to
9b41beb
Compare
I was able to positively confirm that all modules had some effect when added to the go.work. For instance:
Fixes #5991
Signed-off-by: Juraci Paixão Kröhling juraci@kroehling.de