Skip to content
This repository has been archived by the owner on Sep 9, 2020. It is now read-only.

Dep ensure -update produces solve error #461

Closed
murphyke opened this issue Apr 25, 2017 · 5 comments
Closed

Dep ensure -update produces solve error #461

murphyke opened this issue Apr 25, 2017 · 5 comments

Comments

@murphyke
Copy link

dep ensure -update
solve error: No versions of gopkg.in/olivere/elastic.v5 met constraints:
	v5.0.36: Could not introduce gopkg.in/olivere/[email protected], as it is not allowed by constraint master from project [... an enterprise github repo ...].
... lots of versions of this package ...

What I did:

  • Ran dep init - OK
  • Ran dep ensure -update - error
  • Ran dep status - no output (I see there is a ticket for this)
  • Ran dep ensure - OK
  • Ran dep status - expected output
  • Ran dep ensure -update - error
  • Updated to latest dep
  • Ran dep ensure -update - error

I made no manual tweaks to the files produced by dep.

go 1.8. Latest dep (54b423), although it would be nice if it had a version subcommand.

@sdboyer
Copy link
Member

sdboyer commented Apr 25, 2017

it is not allowed by constraint master from project [... an enterprise github repo ...]

And that repo has a Gopkg.toml committed in it, right?

@murphyke
Copy link
Author

Yes, my repo (the enterprise github repo) has Gopkg.toml as created by dep:

...
[[dependencies]]
  branch = "master"
  name = "gopkg.in/olivere/elastic.v5"
...

@sdboyer
Copy link
Member

sdboyer commented Apr 28, 2017

...
[[dependencies]]
  branch = "master"
  name = "gopkg.in/olivere/elastic.v5"
...

Right, so, this is going to be an inherent conflict, because gopkg.in's semantics don't actually allow the branch named "master" to come through (assuming I'm remembering my gopkg.in implementation correctly), but that's the only thing the constraint will accept. It should be impossible for any Gopkg.toml with that constraint/import path combination in it to ever solve successfully (...though you do have a successful dep ensure in your command history, which is surprising).

I can imagine a pathway where dep init might have generated a Gopkg.toml with that constraint for you, despite it being unresolvable. Yes, that sucks 😄 . Fortunately, it's a case that should be covered by the new init behavior we're working on - #277.

For now, you'll need to change that constraint to something that will actually work. Or, since you're using gopkg.in (for which dep largely obviates the need, btw), you can just omit the constraint entirely; only acceptable versions will make it through, anyway.

@murphyke
Copy link
Author

Thanks, BTW. You can close this or keep it open as you wish.

@sdboyer
Copy link
Member

sdboyer commented May 25, 2017

gotcha - will close, nothing for us to do here. thanks for the bump 😄

@sdboyer sdboyer closed this as completed May 25, 2017
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

2 participants