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

Trouble vendoring docker with glide #661

Open
deinspanjer opened this issue Nov 1, 2016 · 2 comments
Open

Trouble vendoring docker with glide #661

deinspanjer opened this issue Nov 1, 2016 · 2 comments

Comments

@deinspanjer
Copy link

deinspanjer commented Nov 1, 2016

I'm working on a project and wanted to convert it over to using glide.

I ran glide create and generated the following yaml:

package: github.com/myco/myapp
import:
- package: github.com/dghubble/sling
- package: github.com/docker/docker
  subpackages:
  - api/types
  - api/types/container
  - api/types/strslice
  - client
- package: github.com/docker/go-connections
  subpackages:
  - nat
- package: github.com/kardianos/osext
- package: github.com/sanbornm/go-selfupdate
  subpackages:
  - selfupdate
- package: github.com/shibukawa/configdir
- package: golang.org/x/net
  subpackages:
  - context
- package: golang.org/x/oauth2

However, when I tried to run glide install, it kept failing with the errors:

[ERROR]	Error scanning github.com/docker/docker/api/types/container: open /Users/dre/.glide/cache/src/https-github.com-docker-docker/api/types/container: no such file or directory
...
[ERROR]	Error scanning github.com/docker/docker/api/types/strslice: open /Users/dre/.glide/cache/src/https-github.com-docker-docker/api/types/strslice: no such file or directory
...
[ERROR]	Error scanning github.com/docker/docker/client: open /Users/dre/.glide/cache/src/https-github.com-docker-docker/client: no such file or directory
[ERROR]	Failed to retrieve a list of dependencies: Error resolving imports

I tried various combinations of resetting my GOPATH and clearing my previous vendor directory.

Eventually I happened on the one thing that did work.

After creating the yaml, I had to manually run go get github.com/docker/go-connections. For some reason, that then let me run install without a problem, but if I try to run glide update, it still fails with the same errors.

@deinspanjer
Copy link
Author

This has something to do with the change Docker made between 1.12.3 and 1.13.0-dev. They removed the engine-api package and shuffled things around.

It looks like at some point, we put a dependency into our code based on the new 1.13.0-dev structure and I have to either refactor that back out or accept using the dev.

Is it possible to refer to 1.13.0-dev as a semantic version? Especially if I could accept a patch release to stable when it comes?

@stffabi
Copy link

stffabi commented Jan 19, 2017

Docker uses trash for fixing their dependencies, so as a first step glide would need the changes from #740. Afterwards you could fix your dependencies e.g. like here https://github.com/stffabi/watchtower/blob/feature_DependencyFixed/glide.yaml#L6

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

No branches or pull requests

2 participants