-
Notifications
You must be signed in to change notification settings - Fork 101
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
Switch to Go Modules #197
Switch to Go Modules #197
Conversation
@@ -20,19 +20,36 @@ jobs: | |||
working_directory: /go/src/github.com/kudobuilder/kudo | |||
steps: | |||
- checkout | |||
- restore_cache: | |||
keys: | |||
- go-mod-v1-{{ checksum "go.sum" }} | |||
|
|||
# specify any bash command here prefixed with `run: ` | |||
- run: make check-formatting |
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.
now that tests are working... test
target should be part of the run requirement
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
nice work. I really like the immutable build tooling!
there is an issue with having |
We should have tests in CI for sure. We need to really talk about removing our reliance on the Github API for day-to-day use anyway. I'll hold it out for now, let's talk about this all live tomorrow to figure out a resolution. |
@fabianbaier Go Modules does not use |
oh, I'll fill you in via Slack. Basically, the diff was too large to reasonably review. We will do another PR removing |
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
This PR switches to Go Modules. Specifically, it:
dep
.tools.go
to represent binary tool dependencies with Go Modules and bind them to a semver. This is behind a build flag so that they are never compiled in. See: https://github.com/go-modules-by-example/index/blob/ac9bf72/010_tools/README.md for this method. (this addresses @runyontr's concern about tool versioning)README.md
andCONTRIBUTING_GUIDELINES.md
with this new information.vendor/
to the curb by putting it in.gitignore
.There's a few other static analysis tools I'd like to add around spelling, ineffectual assignments, etc., but we can separate that into another PR.
After this branch is merged, we should go through and delete all old, unused branches (except dynamic-crds as that is being re-written). There's no chance that code can reasonably merge being so far from master anyway. Additionally, this probably causes some merge conflicts with #166 - sorry @fabianbaier. Probably never a good time to rip this particular bandaid off.
There wasn't really a smaller way to make this PR happen. There's enough infrastructure changes that my additional little changes around the Makefile are incidental. They're also really helpful with speed given how we need to generate code now. Generating on every
make
task was slow already and IMO hinders a smooth development cycle.BTW - if you have problems testing this, kill your existing package cache (
rm -rf $GOPATH/pkg/
) and try again. There seems to be a caching issue when having the same dependencies pulled by dep and modules. Not sure what the issue was there, but could not reproduce after removing that package cache. On a fresh clone with other projects in my $GOPATH this doesn't seem to be an issue.