Closed maxmeyer closed 6 years ago
hi, welcome! thanks for the issue 😄
Is there a source cache I need to clear? Is there any documentation on this? I used google, but the search was not successful.
there is - it should be at GOPATH/pkg/dep/sources/https-gopkg.in-yaml.v2
. however, it's quite odd that this isn't being handled automatically; fetching the most recent version should be something we handle transparently.
could you tell me the output of git log
, git status
, and git branch -av
in that directory?
Hi @sdboyer,
thanks for your help. I attached the files you requested.
git-branch.txt git-log.txt git-status.txt
Is there any documentation about $GOPATH/pkg/dep/sources/https-gopkg.in-yaml.v2
. I looked for such a cache, but didn't find it.
ah, i don't need the git output from your project, sorry - i need it from what's in $GOPATH/pkg/dep/sources
dir. it must be in
$GOPATH/pkg/dep/sources/https---github.com-go--yaml-yaml
, actually - could you report those three git commands from there?
Is there any documentation about $GOPATH/pkg/dep/sources/https-gopkg.in-yaml.v2. I looked for such a cache, but didn't find it.
there isn't any specific documentation about it, primarily because it's an implementation detail that users, ideally, shouldn't have to worry about. but, we should definitely add just a general FAQ item about the source cache area.
Ah. Sorry. I was just on the wrong machine. I'm going to upload it again.
@sdboyer I'm a bit confused. I just checked the files again. The files given up there, are from within $GOPATH/pkg/dep/sources/https-gopkg.in-yaml.v2
. That's not my project. "git.example.org/project/linebeat" is "the" internal project which references yaml.v2
indirectly.
What I can tell is, that after removing the cache, it works now, but this is kinda cumbersome. I attached the newly generated files + the old ones as I backed up the "old" repository of yaml.v2
REF=$(git rev-parse --short HEAD)
git status > /tmp/git-status-$REF.txt
git branch -av > /tmp/git-branch-$REF.txt
git log > /tmp/git-log-$REF.txt
git-branch-25c4ec8.txt git-branch-a3f3340.txt git-log-25c4ec8.txt git-log-a3f3340.txt git-status-25c4ec8.txt git-status-a3f3340.txt
This is the repository causing the issue: https-gopkg.in-yaml.v2.tar.gz
What I can tell is, that after removing the cache, it works now, but this is kinda cumbersome.
unfortunately, this means we can't investigate what may have gone wrong there, now 😢 😢 😢
That's not my project. "git.example.org/project/linebeat" is "the" internal project which references yaml.v2 indirectly.
right, ok, brief explanation about what's going on.
the verbose output you see there is the solver trying to find a version of your dependencies that will work, according to various criteria (not an exhaustive list):
Gopkg.toml
(if any)gopkg.in/yaml.v2/subpkg
, it will always fail out because that subpackage does not exist in any versions of `yaml.v2)both 2 and 3 entail that we actually inspect the source code of yaml.v2
. that means checking it out on disk. the fatal: reference is not a tree: 25c4ec802a7d637f88d584ab26798e94ad14c13b
message you're seeing coming back from an attempt to do that checkout.
this is kinda cumbersome.
no argument - all of our design is geared towards not requiring the user to know or care about that cache area. we've gotten a lot better at this over the past couple months, but it seems you've found a hole! that's why i was hoping to inspect the state of the problem repository on disk - it might have given us a clue about what went wrong.
nfortunately, this means we can't investigate what may have gone wrong there, now :cry: :cry: :cry:
No. :smile: I made a backup of the whole cache! After I put the old one in place, I get a similar error. Though I've got another package in "that" cache which makes dep init
to fail.
No versions of github.com/markbates/grift met constraints:
master: Unable to update checked out version: fatal: reference is not a tree: 8e706d9b1370e074ed48f3e56b5d29c8b01dd635
oh, brilliant! looking forward to more details, then 😀
On August 4, 2017 10:45:15 AM EDT, "Dennis Günnewig" notifications@github.com wrote:
nfortunately, this means we can't investigate what may have gone wrong there, now :cry: :cry: :cry:
No. :smile: I made a backup of the whole cache!
-- You are receiving this because you were mentioned. Reply to this email directly or view it on GitHub: https://github.com/golang/dep/issues/928#issuecomment-320267789
But how can I help to identify the problem?
oh...wait, when i first responded to that comment, you didn't have the links to the files there. they're there now, i think that's what i need.
i probably won't be able to get back to this for a bit, but it looks like the info we need is there.
Good. I also attached the cached repository as tar.gz-file to the issue. Just in the case you need access to it.
closing this one out, as whatever the underlying cause was, #1279 almost certainly has it covered.
Had the same problem. Turns out this was because my project is the GOPATH and I opened the package in intelliJ with gofmt and goimports configured which resulted in all packages checked out in GOPATH/pkg/dep/sources to be formatter causing this problem. Had to add a scope to stop intellJ from running gofmt or goimport on these files.
What version of Go (
go version
) anddep
(git describe --tags
) are you using?What
dep
command did you run?What did you expect to see?
dep
generates theGopkg.toml
andGopkg.lock
What did you see instead?
Questions