Comments (15)
Thanks for reporting this. I'll be able to look more into it after Friday.
Off the top of my head (no pun intended), I've seen similar things in the past, and I think this might be related to gopkg.in service doing a hacky edit on the git information it serves, which does not quite match what a normal repository would serve. The solution might be to try to submit a PR to gopkg.in to make it serve git information that's more in line with what one would expect, or update Go Package Store to be able to deal with it.
Two questions:
- Are you using the latest
master
version of Go Package Store and all of its dependencies? I.e., did you dogo get -u github.com/shurcooL/Go-Package-Store/cmd/Go-Package-Store
recently? - What does
git --version
print?
from go-package-store.
Ok, I can reproduce too:
$ go get -u gopkg.in/sourcemap.v1
$ Go-Package-Store
Using all Go packages in GOPATH.
Go Package Store server is running at http://localhost:7043/updates.
skipping "gopkg.in/sourcemap.v1" because of remote error:
no HEAD branch
It also affects gostatus
in a similar way:
$ gostatus -v gopkg.in/sourcemap.v1
2017/03/16 10:33:09 gopkg.in/sourcemap.v1: no HEAD branch
? gopkg.in/sourcemap.v1/...
? Unreachable remote (check your connection)
from go-package-store.
Are you using the latest master version of Go Package Store and all of its dependencies?
Yes.
What does git --version print?
git version 2.12.0
For completeness, this is go version devel +d5dc490519 Thu Mar 16 02:44:16 2017 +0000 linux/amd64
.
from go-package-store.
I also thought gopkg.in
could be to blame. I've had issues with it in the past, especially with repos disappearing and it returning non-git replies to requests.
from go-package-store.
The underlying issue is in github.com/shurcooL/vcsstate
package, and it can be reproduced with:
$ goexec -quiet '
rv, err := vcsstate.NewRemoteVCS(vcs.ByCmd("git"))
if err != nil {
log.Fatalln(err)
}
branch, revision, err := rv.RemoteBranchAndRevision("https://gopkg.in/sourcemap.v1")
fmt.Printf("branch = %q\nrevision = %q\nerr = %v\n", branch, revision, err)'
branch = ""
revision = "6e83acea0053641eff084973fee085f0c193c61a"
err = HEAD branch not found in ls-remote output
Basically, it's not able to deduct what is the "default branch" from the remote.
Given that go get -u gopkg.in/sourcemap.v1
seems to work without errors, it's more likely this is a bug in vcsstate
rather than incorrect output from gopkg.in
. But it's also possible go get
behavior is not strict about following specs.
I'll look more into it after Friday.
from go-package-store.
No hurry, just wanted to bring it up so I wouldn't forget about it :) Thanks for looking into it!
from go-package-store.
I've created niemeyer/gopkg#54 which I believe is the root issue that needs to be resolved. Once it is, everything here should work.
I could try to add some hacky workarounds for gopkg.in
import paths in the meantime, but I'd rather not do that.
Below are some notes for my reference.
curl -A 'git/2:2.1.1+github-607-gfba4028' 'https://github.com/go-sourcemap/sourcemap/info/refs?service=git-upload-pack'
curl -A 'git/2:2.1.1+github-607-gfba4028' 'https://gopkg.in/sourcemap.v1/info/refs?service=git-upload-pack'
git ls-remote --symref 'https://github.com/go-sourcemap/sourcemap' HEAD 'refs/heads/*'
git ls-remote --symref 'https://gopkg.in/sourcemap.v1' HEAD 'refs/heads/*'
from go-package-store.
Now it also throws local revision is empty
sometimes:
skipping "gopkg.in/sourcemap.v1" because of remote error:
no HEAD branch
skipping "gopkg.in/src-d/go-git.v4" because:
local revision is empty
from go-package-store.
That's unexpected. Was it a one-off thing, or does it happen reproducibly?
What does gostatus -v 'gopkg.in/src-d/go-git.v4'
print for you, if you have the latest version of gostatus
(and its dependencies)?
from go-package-store.
Apologies for the late reply.
Was it a one-off thing, or does it happen reproducibly?
Ran again today, the same output.
What does gostatus -v 'gopkg.in/src-d/go-git.v4' print for you
$ gostatus -v 'gopkg.in/src-d/go-git.v4'
b # gopkg.in/src-d/go-git.v4/...
b Non-default branch checked out
# Remote URL doesn't match repo URL inferred from import path:
(actual) [email protected]:mvdan/go-git.git
(expected) [email protected]:src-d/go-git.v4
Note that the branch is v4...upstream/v4
as it should be. And the remotes are upstream
and origin
as explained above.
Edit: by above I meant #73.
from go-package-store.
Also, running the latest version of your programs and their deps (unless Go-Package-Store
isn't working properly, ha!)
from go-package-store.
Thanks.
I investigated the gopkg.in/src-d/go-git.v4
issue, and figured out what's going on. See #74.
from go-package-store.
Also seeing the same or similar issue:
% Go-Package-Store -govendor vendor/vendor.json
Reading the list of Go packages from vendor.json file: vendor/vendor.json
Go Package Store server is running at http://localhost:7043/updates.
skipping "cloud.google.com/go" because of remote error:
HEAD branch not found in ls-remote output
skipping "google.golang.org/api" because of remote error:
HEAD branch not found in ls-remote output
from go-package-store.
@bits01, this issue is about gopkg.in repos only (I've renamed it to better reflect that). What you're seeing is not gopkg.in, so it might be a real issue. Can you open a new issue and provide more information on how I can reproduce it?
from go-package-store.
@shurcooL issue #79 thank you for looking into it.
from go-package-store.
Related Issues (20)
- https://github.com and [email protected] equivalence HOT 4
- Don't use a popup if the program is stopped HOT 3
- Become a single-page application, render HTML on frontend. HOT 2
- Stop using deprecated octicons icon font, switch to SVG.
- Doesn't adapt to tracking remotes other than "origin" HOT 11
- Confusing "local revision is empty" skip reason in some situations. HOT 5
- Now reports differences on extra .git in the remote URL HOT 17
- Fails to determine branch on remote Gitiles repos (i.e., via -govendor mode). HOT 5
- Wrongly reports local revisions are ahead of remote revisions. HOT 24
- Support dep HOT 10
- Google Analytics URL's procotol should be HTTPS (or relative) HOT 4
- Document GO_PACKAGE_STORE_GITHUB_TOKEN env var to provide a GitHub token (for higher rate limit, private repos). HOT 3
- Extract and apply rendering performance improvements from PR #86.
- Feature Request: ignore repos. HOT 5
- component: Package doesnโt build with latest Vecty API. HOT 1
- Request: An option to ignore private repos HOT 4
- Add support for Go modules. HOT 7
- Add support for Dark Mode. HOT 1
- Is this still an active project? What can we use with go modules? HOT 3
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. ๐๐๐
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google โค๏ธ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from go-package-store.