-
Notifications
You must be signed in to change notification settings - Fork 9.8k
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
vendor: migrate to "golang/dep" #9155
Conversation
Codecov Report
@@ Coverage Diff @@
## master #9155 +/- ##
=========================================
Coverage ? 75.94%
=========================================
Files ? 359
Lines ? 30046
Branches ? 0
=========================================
Hits ? 22817
Misses ? 5634
Partials ? 1595 Continue to review full report at Codecov.
|
!vendor/**/License* | ||
!vendor/**/LICENCE* | ||
!vendor/**/LICENSE* | ||
vendor/**/*_test.go |
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.
new line
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.
Just added.
Major change would be enforcing etcd dependencies (e.g. grpc-go v1.7.5 on |
@sdboyer Could you quickly go over this? Gopkg.toml 35cae90 1838ee1 is the diff between
|
build
Outdated
@@ -36,31 +36,14 @@ etcd_build() { | |||
# Static compilation is useful when etcd is run in a container. $GO_BUILD_FLAGS is OK | |||
|
|||
# shellcheck disable=SC2086 | |||
CGO_ENABLED=0 go build $GO_BUILD_FLAGS -installsuffix cgo -ldflags "$GO_LDFLAGS" -o "${out}/etcd" ${REPO_PATH}/cmd/etcd || return | |||
CGO_ENABLED=0 go build $GO_BUILD_FLAGS -installsuffix cgo -ldflags "$GO_LDFLAGS" -o "${out}/etcd" . || return |
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.
i think having ${REPO_PATH}
as build path is more strict.
build
Outdated
rm -rf "${etcdGOPATH}/src" | ||
mkdir -p "${etcdGOPATH}" | ||
ln -s "${CDIR}/cmd/vendor" "${etcdGOPATH}/src" | ||
CGO_ENABLED=0 go build $GO_BUILD_FLAGS -installsuffix cgo -ldflags "$GO_LDFLAGS" -o "${out}/etcdctl" ./etcdctl || return |
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.
maybe have ${REPO_PATH}/etcdctl
? i think it is more strict.
lgtm after few suggestions. |
Signed-off-by: Gyuho Lee <gyuhox@gmail.com>
Signed-off-by: Gyuho Lee <gyuhox@gmail.com>
Signed-off-by: Gyuho Lee <gyuhox@gmail.com>
Signed-off-by: Gyuho Lee <gyuhox@gmail.com>
Signed-off-by: Gyuho Lee <gyuhox@gmail.com>
Signed-off-by: Gyuho Lee <gyuhox@gmail.com>
Signed-off-by: Gyuho Lee <gyuhox@gmail.com>
Signed-off-by: Gyuho Lee <gyuhox@gmail.com>
Signed-off-by: Gyuho Lee <gyuhox@gmail.com>
Signed-off-by: Gyuho Lee <gyuhox@gmail.com>
Signed-off-by: Gyuho Lee <gyuhox@gmail.com>
Signed-off-by: Gyuho Lee <gyuhox@gmail.com>
Signed-off-by: Gyuho Lee <gyuhox@gmail.com>
Signed-off-by: Gyuho Lee <gyuhox@gmail.com>
Signed-off-by: Gyuho Lee <gyuhox@gmail.com>
Signed-off-by: Gyuho Lee <gyuhox@gmail.com>
Signed-off-by: Gyuho Lee <gyuhox@gmail.com>
Signed-off-by: Gyuho Lee <gyuhox@gmail.com>
Signed-off-by: Gyuho Lee <gyuhox@gmail.com>
ack. sorry. i was taken up all this week with the new release of dep. awesome to see you pulled the trigger, though! the comments i'd make are:
|
@sdboyer Awesome. Thanks for the tips! We will address those shortly! |
There are some really unfortunate side effects as a result of this. For instance, cockroachdb wants to use a newer version of gogo/protobuf than what's specified in your new Gopkg.toml - the result is that dep will refuse to ignore etcd's specified version and won't resolve (in the presence of the two constraints etcd.branch = master and protobuf.branch = master). As far as I know, there's no workaround here, other than for etcd to be very careful to not over-constrain your dependencies (and currently they appear to all be maximally constrained; your Gopkg.toml is roughly equivalent to your Gopkg.lock). |
@tamird Wasn't aware of it. We did over-constrain the dependencies to minimize difference during migration. But open to any workaround if that works for external projects. I see https://github.com/cockroachdb/cockroach/blob/master/Gopkg.toml#L92 [[constraint]]
name = "github.com/gogo/protobuf"
branch = "master" Would |
@gyuho no, that still doesn't work. You can, at minimum, remove all |
Replacing all our constraints with |
why does an override not work? this is what they're actually designed for. |
@gyuho you shouldn't need any constraints at all, provided you don't run I'm suggesting you simply delete all the @sdboyer "why" is a bit of an academic question - I can't tell you why. All I know is that using
|
I'm not sure what makes "why" an academic question - that's the info i needed. the problem is a conflict on |
I'm fine with deleting constraints from
@sdboyer Is this the valid use case for editing |
@sdboyer yeah, that seems to work, but requires an override for every overlapping dependency (of which github.com/gogo/protobuf is just one). @gyuho why do you need to hand-edit Gopkg.lock? You can update single packages with |
Fix #7225.