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

dep init from godep fails #924

Closed
stapelberg opened this issue Jul 30, 2017 · 1 comment · Fixed by #938
Closed

dep init from godep fails #924

stapelberg opened this issue Jul 30, 2017 · 1 comment · Fixed by #938

Comments

@stapelberg
Copy link

What version of Go (go version) and dep (git describe --tags) are you using?

go version go1.9rc1 linux/amd64

dep version: v0.1.0-300-g310c2c8

What dep command did you run?

% go get -u github.com/Debian/dcs
% cd go/src/github.com/Debian/dcs
% git reset --hard 67a398e
% dep init -v  
Importing configuration from godep. These are only initial constraints, and are further refined during the solve process.
Detected godep configuration files...
  Loading /home/michael/go/src/github.com/Debian/dcs/Godeps/Godeps.json
Converting from Godeps.json ...
  Using master as initial constraint for imported dep github.com/beorn7/perks
  Trying master (4c0e845) as initial lock for imported dep github.com/beorn7/perks
  Trying * (c9c7427) as initial lock for imported dep github.com/golang/protobuf
  Using master as initial constraint for imported dep github.com/google/codesearch
  Trying master (a45d81b) as initial lock for imported dep github.com/google/codesearch
  Using >=1.0.0, <=2.0.0-gc12348c as initial constraint for imported dep github.com/matttproud/golang_protobuf_extensions
  Trying * (c12348c) as initial lock for imported dep github.com/matttproud/golang_protobuf_extensions
  Trying * (7157c0d) as initial lock for imported dep github.com/pebbe/zmq4
  Using >=0.8.0, <=60.0.0-g738ed6c as initial constraint for imported dep github.com/prometheus/client_golang
  Trying * (738ed6c) as initial lock for imported dep github.com/prometheus/client_golang
model-0.0.2-14-g6f38060 is not a valid version for the package github.com/prometheus/client_model()

What did you expect to see?

New files.

What did you see instead?

dep init aborted, not touching anything.

Note that the version actually is valid (and current):

% go get -u github.com/prometheus/client_model
% cd go/src/github.com/prometheus/client_model
% git describe
model-0.0.2-14-g6f38060

Also, I looked for a “keep going” flag (e.g. -f), but couldn’t find one. Aside from this specific issue, should we maybe add such an option, so that users can easily convert an existing (possibly broken) setup to dep?

@darkowlzz
Copy link
Collaborator

darkowlzz commented Jul 31, 2017

Hi @stapelberg , thanks for trying dep.

Sorry that the importer failed. This seems to be happening due to the way we parse semver. There's an issue and a PR in Masterminds/semver to fix the same.

For now, I think if you edit Godeps.json and change model-0.0.2-14-g6f38060 to model-0.0.2 it would take that tag and continue working. Or even remove the Comment field, and it would continue with the revision.

Also, we have #909 which is similar to the "keep going" idea.

Hope this helps :)

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants