-
Notifications
You must be signed in to change notification settings - Fork 712
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
Convert to Go modules #3742
Convert to Go modules #3742
Conversation
Created by running `go mod init`; all versions the same as before.
Without this we get a build error: github.com/Sirupsen/logrus: github.com/Sirupsen/[email protected]: parsing go.mod: module declares its path as: github.com/sirupsen/logrus but was required as: github.com/Sirupsen/logrus
This was useful to cache dependent library builds, but Go does that better now so we don't need the flag.
Need workaround until a fix upstream such as https://github.com/iovisor/gobpf/pull/206/files is merged.
Thanks for taking your time with this @bboreham! Good catch with the last commit as well, as you mentioned Overall, the code looks good, wanted to look into the build and test the behavior quickly! :) |
This is a small program used to watch app and probe running inside the container. We need to go round a few houses to be able to build it from vendor directory.
There is no way to pass `-mod=vendor` through to the Go compilation that codecgen runs.
This bit is unnecessary with newer versions of Go that cache builds for different tags in different places.
I made weaveworks/tcptracer-bpf#69 to avoid the manual copy for one file. |
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.
Significant change! Thanks @bboreham. CI is green, I think we're good.
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.
Good one. Thanks for the PR @bboreham
Done by running
go mod init
then fixing compilation errors thengo mod vendor
.A few C files needed to be manually added.
There are a lot of files moved or deleted, because
go mod vendor
flattens dependencies at the top level and the previous tool,gvt
, did not.