Skip to content
This repository has been archived by the owner on Feb 26, 2019. It is now read-only.

godep update adds dependencies' vendor directories #498

Open
bhcleek opened this issue Jul 21, 2016 · 7 comments
Open

godep update adds dependencies' vendor directories #498

bhcleek opened this issue Jul 21, 2016 · 7 comments

Comments

@bhcleek
Copy link

bhcleek commented Jul 21, 2016

Expected behavior

godep update does not add the updated dependencies' vendored dependencies.

Actual behavior

godep update vendors dependencies' vendored dependencies.

Step 2 (correctly) does not create $GOPATH/src/bar/vendor/foo/vendor/quux, but step 3 does.

Steps to reproduce behavior

With this tree:

$GOPATH/src/
  foo/
    vendor/
        quux/
          quux.go
    foo.go
  bar/
    bar.go

And assuming that bar imports foo,

  1. cd $GOPATH/src/bar
  2. godep save
  3. godep update foo

godep version output

godep v74 (darwin/amd64/go1.6.2)

go version output

go version go1.6.2 darwin/amd64

@dvcrn
Copy link

dvcrn commented Aug 10, 2016

I am also not sure whether this is normal beahvior or a bug. Is godep update supposed to vendor the vendor of the vendor?

@freeformz
Copy link

No, this is a bug.

On Wed, Aug 10, 2016 at 1:24 AM David Mohl [email protected] wrote:

I am also not sure whether this is normal beahvior or a bug. Is godep
update supposed to vendor the vendor of the vendor?


You are receiving this because you are subscribed to this thread.
Reply to this email directly, view it on GitHub
#498 (comment), or mute
the thread
https://github.com/notifications/unsubscribe-auth/AAAAZ00Orxlat6zca-cIBDXz-mfvJy6lks5qeYrVgaJpZM4JSJQ8
.

@bhcleek
Copy link
Author

bhcleek commented Aug 10, 2016

Here is a workaround until this gets fixed:

  1. Remove all entries for the dependency to be updated from Godeps/Godeps.json.
  2. Remove the directory root for the dependency to be updated from vendor.
  3. re-vendor the dependency using godep save [packages].

@ronnylt
Copy link

ronnylt commented Aug 18, 2016

I think this is the expected behavior.

From https://golang.org/s/go15vendor

The second is that this does not attempt to solve the problem of vendoring resulting in multiple copies of a package being linked into a single binary. Sometimes having multiple copies of a library is not a problem; sometimes it is. At least for now, it doesn’t seem that the go command should be in charge of policing or solving that problem.

So the expected should be to also vendor vendors dependencies' and so on...

godepshould also remove the vendor directories

@oscarzhao
Copy link

oscarzhao commented Aug 30, 2016

I also want flattened dependencies . kubernetes uses github.com/golang/glog, my project uses glog too, but i cannot manage glog with godep

@freeformz
Copy link

FWIW: Now that work has started for a native solution (
https://groups.google.com/forum/#!msg/go-package-management/P8TehVoFLjg/Ni6VRyOjEAAJ),
I'm likely not going to be working on godep very much. In the interim I'm
suggesting people migrate to govendor (https://github.com/kardianos/govendor)
if they are having problems with godep.

On Tue, Aug 30, 2016 at 5:00 AM oscarzhao [email protected] wrote:

I also want flattened dependencies


You are receiving this because you commented.

Reply to this email directly, view it on GitHub
#498 (comment), or mute
the thread
https://github.com/notifications/unsubscribe-auth/AAAAZ1aTsETEz26p_4ncyujWkaREuTNZks5qlBtvgaJpZM4JSJQ8
.

@oscarzhao
Copy link

kubernetes/client-go solved my problem, eventually

gnawux added a commit to gnawux/hyper that referenced this issue Apr 8, 2017
godep will introduce a nested-vendor issue when update a dep:

```
godep update github.com/hyperhq/runv/...
```

will include `github.com/hyperhq/runv/vendor/*` to vendor/ , and this is still an open issue for
 godep tools/godep#498 and has last for more than 8 months.
Move to govendor could solve this.

However, official `go dep` tool is under development (which is not release and not fit for daily
usage yet) and plan to release with go 1.10 by the end of 2017. I am not sure whether we should
 change a vendor tool just for about 9 months. ref: https://github.com/golang/dep/wiki/Roadmap

Signed-off-by: Wang Xu <[email protected]>
tklauser added a commit to tklauser/bpf-map that referenced this issue Apr 11, 2017
Update the cilium godep to get the bpf map-in-map types. Also remove
dependencies' vendor which were introduced by mistake in commit
782193b ("Godeps: update cilium"). This is a know limitation of
godep (see tools/godep#498).

Signed-off-by: Tobias Klauser <[email protected]>
tklauser added a commit to tklauser/bpf-map that referenced this issue Apr 11, 2017
Update the cilium godep to get the bpf map-in-map types introduced in
cilium/cilium#425.

Also remove dependencies' vendor which were introduced by mistake in
commit 782193b ("Godeps: update cilium"). This is a know limitation
of godep (see tools/godep#498).

Signed-off-by: Tobias Klauser <[email protected]>
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

5 participants