I'm writing an application and import some package B
. This package has the vendor
directory inside which, in turn, contains package C
. I also want to use that package C
in my app directly.
So I decided to use glide
package manager. It downloads both B
and C
into myapp/vendor
directory, but keeps myapp/vendor/B/vendor/C
inside. So when I build my app, it builds with two different versions of C (also with myapp/vendor/C
).
How to avoid that?
1) Either, is there a package manager that handles that? govend
seems to with its --prune
argument, but it doesn't respect the versions of these C
packages.
2) Or, how to make glide
properly handle the nested vendor
directories?
Edit
My example is https://github.com/orloffm/flat
. It uses cat
and - indirectly - toy
packages. cat
has some older version of toy
vendored and commited into repository. I do glide create && glide install
and end up with this:
.
├── flat.go
├── glide.lock
├── glide.yaml
└── vendor
└── github.com
└── orloffm
├── cat
│ ├── cat.go
│ ├── vendor
│ │ └── github.com
│ │ └── orloffm
│ │ └── toy
│ │ └── toy.go
│ └── vendor.yml
└── toy
└── toy.go
I don't want to have nested vendor
directory with toy
.