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鈥檒l occasionally send you account related emails.

Already on GitHub? Sign in to your account

Switch to use Go modules #553

Merged
merged 23 commits into from Feb 21, 2019
Merged

Switch to use Go modules #553

merged 23 commits into from Feb 21, 2019

Conversation

dmacvicar
Copy link
Owner

@dmacvicar dmacvicar commented Feb 17, 2019

Until now, we have been using glide to manage dependencies.

I don't think Go modules need an introduction, but here is a good place to start.

This PR moves the dependency handling to use Go 1.11 modules.

Worth mentioning, other providers like AWS already moved. It should not affect the end contributor, as we also vendor dependencies (go mod vendor), but it will give the ability to develop outside of GOPATH, which is very convenient.

The PR also refactors the Makefile/travis chain in order to build using modules with the vendor directory inside travis. I also moved some of the lint/fmt checks from the travis scripts into the main Makefile after realizing the mess was so big having useless scripts inside travis/ that we were NOT actually running unit tests inside Travis 馃槧. We do now.

There are still a bunch of other scripts there to cleanup, so in a later PR I may end removing the travis directory completely.

@dmacvicar dmacvicar changed the title Switch to use Go modules [WIP] Switch to use Go modules Feb 17, 2019
Copy link
Collaborator

@MalloZup MalloZup left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

馃幐馃幎

vendor/modules.txt Outdated Show resolved Hide resolved
@dmacvicar
Copy link
Owner Author

I think it is ready for review now.

@dmacvicar dmacvicar self-assigned this Feb 17, 2019
@dmacvicar dmacvicar changed the title [WIP] Switch to use Go modules Switch to use Go modules Feb 17, 2019
@dmacvicar dmacvicar added this to In Review 馃 in terraform-provider-libvirt Feb 17, 2019
Copy link
Collaborator

@MalloZup MalloZup left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

nice work. 馃 THx for taking care on all this tedious work and cleanup. 馃挊
If it works outside and inside $GOPATH we can merge it. 馃幐

@dmacvicar
Copy link
Owner Author

Tested inside GOPATH with GO111MODULES=off

@dmacvicar dmacvicar merged commit 7a43fbd into master Feb 21, 2019
@dmacvicar
Copy link
Owner Author

Packages are also building correctly. They build with classical GOPATH + vendor/ by using
GO111MODULES=off and GOPROXY=off

@MalloZup MalloZup moved this from In Review 馃 to Done in terraform-provider-libvirt Mar 7, 2019
@MalloZup MalloZup deleted the go_modules branch March 14, 2019 10:43
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.

None yet

2 participants