-
Notifications
You must be signed in to change notification settings - Fork 18k
x/vgo: issue with Git LFS #25605
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
Comments
Hi @mewmew. I am a maintainer of Git LFS, and have seen this bug before. I am out of the office this week, but I’m the meantime can you try with the latest version of Git LFS (v2.4.2 at the time of writing)? Thanks. |
Hi @ttaylorr. I tried with the latest version of Git LFS, and seem to get the same error. Thanks for looking at this. Cheers,
Edit: Contents of
Contents of
|
Without git-lfs installed on my machine, everything is working fine. I imagine that's expected, and that vgo is somehow using git-lfs in an unexpected way. I am going to send out a change to vgo to make -x show all git commands it runs, but I can tell you right now that these are the commands it runs in that repo:
It's that last git archive that fails, of course. It seems unlikely that the log and cat-file commands matter, but that's all of them. I wonder if the problem has to do with being a bare repo, and on top of that one not created by clone? @mewmew, maybe it's worth trying those commands by hand, outside of vgo? |
@rsc I very much appreciate the In this case, when I think that this can be resolved by teaching vgo to first add a remote for any non-local repository it's interested in, and then use that remote instead of a URL. In practice: --- vgo 2018-06-06 12:27:32.000000000 -0700
+++ vgo-remote 2018-06-06 12:28:02.000000000 -0700
@@ -1,6 +1,7 @@
mkdir -p /tmp/foo/src/v/cache/vcswork/33d7fd8670cc26328c70a1aa2e256f39e8677b5051ce504802f38deaa8cce53c
cd /tmp/foo/src/v/cache/vcswork/33d7fd8670cc26328c70a1aa2e256f39e8677b5051ce504802f38deaa8cce53c
git init --bare
+git remote add origin https://github.com/azul3d/engine
-git ls-remote -q https://github.com/azul3d/engine
+git ls-remote -q origin
git log -n1 --format=format:%H eb48fbeb6d97
-git fetch https://github.com/azul3d/engine
+git fetch origin If this is an approach that you think would be OK for vgo, I would be happy to write a patch to that effect. |
Change https://golang.org/cl/116756 mentions this issue: |
Change https://golang.org/cl/116758 mentions this issue: |
Sure, we can adjust the command being run to do that. I'll take care of it. Change sent. Thanks. |
@rsc wonderful, CL 116758 works great for me: # (in vgo)
$ git show --oneline -q HEAD
426db6d (HEAD -> master) cmd/go/internal/modfetch/gitrepo: fix problem with Git LFS
$ git clone https://github.com/mewkiz/flac
# ...
# (in mewkiz/flac.git)
$ vgo build ./...
vgo: creating new go.mod: module github.com/mewkiz/flac
vgo: resolving import "github.com/icza/bitio"
vgo: finding github.com/icza/bitio (latest)
vgo: adding github.com/icza/bitio v0.0.0-20180221120200-b25b30b42508
vgo: resolving import "github.com/mewkiz/pkg/errutil"
vgo: finding github.com/mewkiz/pkg (latest)
vgo: adding github.com/mewkiz/pkg v0.0.0-20170428133157-c19a6f9fa6f8
vgo: resolving import "github.com/mikkyang/id3-go/encodedbytes"
vgo: finding github.com/mikkyang/id3-go (latest)
vgo: adding github.com/mikkyang/id3-go v0.0.0-20151201011346-0168d962f1d7
vgo: resolving import "azul3d.org/engine/audio"
vgo: finding azul3d.org/engine (latest)
vgo: adding azul3d.org/engine v0.0.0-20170701203912-eb48fbeb6d97
vgo: downloading azul3d.org/engine v0.0.0-20170701203912-eb48fbeb6d97
vgo: resolving import "github.com/djimenez/iconv-go"
vgo: finding github.com/djimenez/iconv-go (latest)
vgo: adding github.com/djimenez/iconv-go v0.0.0-20160305225143-8960e66bd3da
vgo: finding github.com/djimenez/iconv-go v0.0.0-20160305225143-8960e66bd3da
vgo: downloading github.com/djimenez/iconv-go v0.0.0-20160305225143-8960e66bd3da Thanks! 🙇 |
For posterity: I think that any repositories being built by vgo depend on a Git LFS object during compilation will fail, since those objects will not be checked out, (because the repository is bare). That's a limitation of |
The -x flag means "show commands being run". Do that. Can help debug problems like golang/go#25605. Change-Id: I346dbb86651b75e326418452a6e3e7f534cb3bc9 Reviewed-on: https://go-review.googlesource.com/116756 Run-TryBot: Russ Cox <rsc@golang.org> TryBot-Result: Gobot Gobot <gobot@golang.org> Reviewed-by: Bryan C. Mills <bcmills@google.com>
What version of Go are you using (
go version
)?u@x220 ~> go version
go version go1.10.2 linux/amd64
Does this issue reproduce with the latest release?
Yes.
What operating system and processor architecture are you using (
go env
)?What did you do?
Reproducible example for mewkiz/flac@fa00a54
What did you expect to see?
Working build.
What did you see instead?
Log files:
The text was updated successfully, but these errors were encountered: