I am confused about the usage of flatten flag with glide.yaml. To flatten nested dependencies in vendor directory, are we supposed to add any such flag or is it included by default(release 0.7.0)?
I am using kubernetes and glog in my project and since glog is also present in vendor directory of kubernetes, there is a panic happening. With my understanding of glide up it should fetch only one copy of glog in my project's vendor directory and there should not be any copy in kubernetes vendor directory. Is it correct to assume that?
There were some issues with this in the past. Can you update to Glide 0.10.2 and try again?
I am using glide version 0.10.2 and also tried to put flatten: true at top level package. Glide fetched glog in two locations.
Can you share your glide.yaml file and projects directory structure? It would make it easier for me to figure out what's going on.
This is how my dir structure looks like
tree -L 1
.
โโโ alertconfig
โโโ am
โโโ configserver
โโโ glide.lock
โโโ glide.yaml
โโโ healthwatcher
โโโ promeconfig
โโโ test
โโโ tm-sidekick
โโโ vendor
and glide.yaml is
package: .
flatten: true
import:
- package: github.com/coreos/etcd
subpackages:
- client
- package: github.com/golang/glog
- package: github.com/golang/mock
subpackages:
- gomock
- package: github.com/google/gofuzz
- package: github.com/gorilla/handlers
- package: github.com/gorilla/mux
- package: github.com/onsi/ginkgo
subpackages:
- config
- package: github.com/onsi/gomega
- package: github.com/spf13/cobra
- package: github.com/spf13/pflag
- package: github.com/spf13/viper
- package: github.com/taviti/caldav-go
subpackages:
- webdav
- webdav/entities
- package: golang.org/x/net
subpackages:
- context
- package: gopkg.in/inf.v0
- package: gopkg.in/validator.v2
- package: k8s.io/kubernetes
Vendor dir struct
tree -L 3
.
โโโ github.com
โย ย โโโ BurntSushi
โย ย โย ย โโโ toml
โย ย โโโ coreos
โย ย โย ย โโโ etcd
โย ย โโโ golang
โย ย โย ย โโโ glog
โย ย โย ย โโโ mock
โย ย โโโ onsi
โย ย โย ย โโโ ginkgo
โย ย โย ย โโโ gomega
...
โโโ k8s.io
โโโ kubernetes
โโโ api
โโโ vendor
โโโ www
and kubernetes vendor dir struct
vendor/k8s.io/kubernetes/vendor$ tree -L 3
.
โโโ bitbucket.org
โย ย โโโ bertimus9
โย ย โย ย โโโ systemstat
โย ย โโโ ww
โย ย โโโ goautoneg
โโโ github.com
โย ย โโโ coreos
โย ย โย ย โโโ etcd
โย ย โย ย โโโ go-etcd
โย ย โย ย โโโ go-oidc
โย ย โย ย โโโ go-semver
โย ย โย ย โโโ go-systemd
โย ย โย ย โโโ pkg
โย ย โย ย โโโ rkt
โย ย โโโ golang
โย ย โย ย โโโ glog
โย ย โย ย โโโ groupcache
โย ย โย ย โโโ mock
โย ย โย ย โโโ protobuf
(removed a bunch of entries for readability)
@mattfarina I'm facing the same issue here. Has support for flatten been removed? I can't see it in the documentation as well.
Most helpful comment
@mattfarina I'm facing the same issue here. Has support for flatten been removed? I can't see it in the documentation as well.