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

build: switch from dep to go modules #2239

Merged
merged 9 commits into from
Nov 29, 2018

Conversation

Roasbeef
Copy link
Member

In this PR, we switch from using dep for our dependency management to using go modules instead. This change is made possible by #1892. As a result of these set of changes, lnd no longer needs to live in the $GOPATH! Instead, it can now live anywhere on ones file system. Go modules will automatically be activated if it detects a build happening outside the $GOPATH. In order to activate support within the $GOPATH, the following environment variable needs to be set when building: GO111MODULE=on. Once go 1.12 is released, this will no longer be required however.

All relevant documentation has been updated to reflect the new building commands (no more dep is it really). We also update the makefile to use the environment variable as necessary, and read commit hashes from go.sum instead of Gopkg.lock. Now that we have build caching, we can also safely cache the directory that Go uses to store the modules information. This should further speed up our builds.

In this commit, we remove the dep section as we no longer use it, and
instead use go modues.
In this commit, we remove the travis section as the directive has been
removed from the makefile.
with '#' will be ignored, and an empty message aborts the commit.
In this commit, we update the makefile to be aware of go modules. Along
the way, we remove all references to dep as we no longer use it within
this project. Note that in order to allow usage of go modules within the
$GOPATH directory, we set the `GO111MODULE=on` environment variable.
Copy link
Contributor

@cfromknecht cfromknecht left a comment

Choose a reason for hiding this comment

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

Yay go modules! LGTM 🤓

@Roasbeef Roasbeef merged commit b5dd186 into lightningnetwork:master Nov 29, 2018
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.

2 participants