Skip to content
This repository has been archived by the owner on Jul 15, 2023. It is now read-only.

Cannot install goreturn.exe #522

Closed
megascus opened this issue Oct 11, 2016 · 10 comments
Closed

Cannot install goreturn.exe #522

megascus opened this issue Oct 11, 2016 · 10 comments

Comments

@megascus
Copy link

Installing 1 tools
goreturns.exe

Installing goreturns.exe FAILED

1 tools failed to install.

goreturns.exe:
Error: Command failed: go get -u -v undefined
package undefined: unrecognized import path "undefined" (import path does not begin with hostname)
package undefined: unrecognized import path "undefined" (import path does not begin with hostname)

@ramya-rao-a
Copy link
Contributor

ramya-rao-a commented Oct 11, 2016

The PR #463 will fix this and the next Go extension update will have this fix.
If you are blocked, then run go get -u -v sourcegraph.com/sqs/goreturns manually to install the goreturns tool

@tsauvajon
Copy link

go get -v sourcegraph.com/sqs/goreturns
can't load package: package sourcegraph.com/sqs/goreturns: no Go files in C:\GOPATH\src\sourcegraph.com\sqs\goreturns

@ramya-rao-a
Copy link
Contributor

You need to pass the -u flag as well to the go get command
Updated my earlier comment to relfect the same

@tsauvajon
Copy link

tsauvajon commented Oct 9, 2017

I've had no success with or without -u. (no pun intended)

I used go get -v -u github.com/sqs/goreturns as indicated in another issue (I can't find it again, sadly) to make it work.

@ramya-rao-a
Copy link
Contributor

I just tried go get -v -u github.com/sqs/goreturns and it works just fine.
Maybe log an issue at https://github.com/sqs/goreturns?

@sqs any idea why go get -v -u github.com/sqs/goreturns would fail with "no Go files in ...." ? See #522 (comment)

@sqs
Copy link

sqs commented Oct 9, 2017

Hmm, sorry about the issue. I’m not sure what’s going on but I have some ideas to troubleshoot it.

What’s in the goreturns directory after running the command?

Does it work when you run go get with github.com but not sourcegraph.com? If so, then what do you see when you visit Sourcegraph.com in your browser? Our Cloudflare proxy may have flagged your IP for some reason and require a CAPTCHA. We’ve seen this once a while ago but thought we had fixed it.

@tsauvajon
Copy link

tsauvajon commented Oct 10, 2017

@sqs It redirects me to https://about.sourcegraph.com and displays the index normally.

>go get -u -v sourcegraph.com/sqs/goreturns
# cd C:\GOPATH\src\sourcegraph.com\sqs\goreturns; git config remote.origin.url package sourcegraph.com/sqs/goreturns: remote origin not found

%GOPATH%\src\sourcegraph.com\sqs\goreturns only contains the .git directory

@ramya-rao-a go get -v -u github.com/sqs/goreturns works, while go get -v -u sourcegraph.com/sqs/goreturns doesn't.

@keegancsmith
Copy link

@tsauvajon What version of go are you using? I am on go 1.9.1 on darwin and I can't reproduce. Your go get seems to have done the wrong thing. If you remove C:\GOPATH\src\sourcegraph.com\sqs\goreturns does it work? By the looks of it our go get proxy is doing the correct behaviour. If you visit https://sourcegraph.com/sqs/goreturns?go-get=1 do you see the following when you "view page source":

<html><head><meta name="go-import" content="sourcegraph.com/sqs/goreturns git https://github.com/sqs/goreturns"></head><body></body></html>

@tsauvajon
Copy link

tsauvajon commented Oct 10, 2017

@keegancsmith
Go version : go version go1.9 windows/amd64

The source for https://sourcegraph.com/sqs/goreturns?go-get=1 is correct :

<html><head><meta name="go-import" content="sourcegraph.com/sqs/goreturns git https://github.com/sqs/goreturns"></head><body></body></html>

Deleting the sourcegraph folder and go getting again made it work.

@itcuihao
Copy link

itcuihao commented Jan 8, 2018

[src] go get -v -u github.com/sqs/goreturns                                             11:08:57
github.com/sqs/goreturns (download)
Fetching https://golang.org/x/tools/imports?go-get=1
https fetch failed: Get https://golang.org/x/tools/imports?go-get=1: dial tcp 216.239.37.1:443: i/o timeout
golang.org/x/tools (download)
# cd /usr/local/mygo/src/golang.org/x/tools; git pull --ff-only
fatal: unable to access 'https://github.com/golang/tools.git/': Empty reply from server
package golang.org/x/tools/imports: exit status 1

go version go1.9.2 darwin/amd64

@vscodebot vscodebot bot locked and limited conversation to collaborators Jan 23, 2018
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

6 participants