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

dep update fails, error message missing data #1842

Closed
manuel-huez opened this issue May 2, 2018 · 6 comments
Closed

dep update fails, error message missing data #1842

manuel-huez opened this issue May 2, 2018 · 6 comments

Comments

@manuel-huez
Copy link

manuel-huez commented May 2, 2018

--snipped--

@manuel-huez
Copy link
Author

The problem seems to solve itself when I update the .lock file manually and then run go ensure.

@mattayes
Copy link
Contributor

mattayes commented May 5, 2018

Hey @manuel-huez, sorry you're running into issues. This sounds like a general question. I recommend reaching out to the community first and seeing if they can help.

@manuel-huez
Copy link
Author

manuel-huez commented May 5, 2018

Hey @mattayes, thanks for reaching back.
I don't think it was a general question— I apologize if it was poorly formatted. I feel like there's an issue with how dep handles circular dependencies across different repositories. In this example, github.com/processout/api imports github.com/processout/worker (and vice-versa) and versions match, but a weird error pops up:

Solving failure: No versions of github.com/processout/api met constraints:
	develop: Could not introduce github.com/processout/api@develop, as it has a dependency on github.com/processout/worker with constraint develop, which does not allow the currently selected version of

Notice how the error message ends in the middle of the sentence.

@manuel-huez
Copy link
Author

This seems to be closely related to #1131, although I did somehow manage to run dep init at some point.

@aliakseiz
Copy link

Perhaps I faced the same issue: projectA depends on projectB and vice-versa, branches have same names if it matters:

Solving failure: No versions of repository/projectA met constraints:
        develop: Could not introduce repository/projectA@develop, as it is not allowed by constraint feature/branch from project repository/projectB.
        feature/branch: Could not introduce repository/projectA@feature/branch, as it has a dependency on repository/projectB with constraint feature/branch, which does not allow the currently selected version of

Workaround to solve the issue:

  1. Manually update Gopkg.lock file.
    Change the branch name for projectB entry to feature/branch and update revision to latest one in projectB@feature/branch.
  2. Remove projectB directory from vendors to force dep to re-download it, because dep ensure -update will still fail with the same output, as above.
  3. dep ensure -v
# Bringing vendor into sync
(1/1) Wrote repository/projectA@feature/branch: missing from vendor

As a result, required projectB revision will be stored in vendors.

Indeed looks similar to #1131.

@mvdan
Copy link
Member

mvdan commented Sep 4, 2020

Dep was officially deprecated earlier this year, and the proposal to archive this repository was accepted. As such, I'm closing outstanding issues before archiving the repository. For any further comments, please use the proposal thread on the Go issue tracker. Thanks!

@mvdan mvdan closed this as completed Sep 4, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants