Skip to content
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

Merged
merged 12 commits into from
Jan 15, 2020
Merged

Convert to Go modules #3742

merged 12 commits into from
Jan 15, 2020

Conversation

bboreham
Copy link
Collaborator

Done by running go mod init then fixing compilation errors then go 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.

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.
Makefile Show resolved Hide resolved
@fbarl
Copy link
Contributor

fbarl commented Jan 14, 2020

Thanks for taking your time with this @bboreham!

Good catch with the last commit as well, as you mentioned bpf.h and bpf_map.h are waiting for iovisor/gobpf#206, but what about vendor/github.com/weaveworks/tcptracer-bpf/tcptracer-bpf.h? Shall we open a PR that fixes that one?

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.
@bboreham
Copy link
Collaborator Author

I made weaveworks/tcptracer-bpf#69 to avoid the manual copy for one file.

Copy link
Contributor

@satyamz satyamz left a 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.

Copy link
Contributor

@qiell qiell left a 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

@bboreham bboreham merged commit 35451b4 into master Jan 15, 2020
@bboreham bboreham deleted the go-modules branch January 15, 2020 12:20
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants