Skip to content
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

go get failed #25

Open
uudashr opened this issue Feb 14, 2020 · 34 comments
Open

go get failed #25

uudashr opened this issue Feb 14, 2020 · 34 comments

Comments

@uudashr
Copy link
Owner

uudashr commented Feb 14, 2020

$ GO111MODULE=on go get github.com/uudashr/gopkgs/cmd/gopkgs@latest
go: finding github.com/uudashr/gopkgs/cmd/gopkgs latest
go get: github.com/uudashr/gopkgs/cmd/gopkgs@v0.0.0-20191024034442-58e9141cd7d6 requires
	github.com/uudashr/gopkgs/v2@v2.1.0 requires
	github.com/uudashr/gopkgs@v0.0.0: reading github.com/uudashr/gopkgs/go.mod at revision v0.0.0: unknown revision v0.0.0
@uudashr
Copy link
Owner Author

uudashr commented Feb 14, 2020

cc @nezorflame

This was referenced Feb 14, 2020
@sh3rp
Copy link

sh3rp commented Feb 14, 2020

FYI this issue will come up anytime someone does a fresh install of VSCode (as I just did).

gopkgs:
Error: Command failed: /usr/local/go/bin/go get -v github.com/uudashr/gopkgs/cmd/gopkgs
go: finding github.com/uudashr/gopkgs/cmd/gopkgs latest
go: finding github.com/uudashr/gopkgs v2.0.1+incompatible
go: downloading github.com/uudashr/gopkgs v2.0.1+incompatible
go: downloading github.com/uudashr/gopkgs/cmd/gopkgs v0.0.0-20191024034442-58e9141cd7d6
go: extracting github.com/uudashr/gopkgs v2.0.1+incompatible
go: extracting github.com/uudashr/gopkgs/cmd/gopkgs v0.0.0-20191024034442-58e9141cd7d6
go get: github.com/uudashr/gopkgs/cmd/gopkgs@v0.0.0-20191024034442-58e9141cd7d6 requires
github.com/uudashr/gopkgs/v2@v2.1.0 requires
github.com/uudashr/gopkgs@v0.0.0: reading github.com/uudashr/gopkgs/go.mod at revision v0.0.0: unknown revision v0.0.0
go: finding github.com/uudashr/gopkgs/cmd/gopkgs latest
go: finding github.com/uudashr/gopkgs v2.0.1+incompatible
go: downloading github.com/uudashr/gopkgs v2.0.1+incompatible
go: downloading github.com/uudashr/gopkgs/cmd/gopkgs v0.0.0-20191024034442-58e9141cd7d6
go: extracting github.com/uudashr/gopkgs v2.0.1+incompatible
go: extracting github.com/uudashr/gopkgs/cmd/gopkgs v0.0.0-20191024034442-58e9141cd7d6
go get: github.com/uudashr/gopkgs/cmd/gopkgs@v0.0.0-20191024034442-58e9141cd7d6 requires
github.com/uudashr/gopkgs/v2@v2.1.0 requires
github.com/uudashr/gopkgs@v0.0.0: reading github.com/uudashr/gopkgs/go.mod at revision v0.0.0: unknown revision v0.0.0

@vickylance
Copy link

Yup this issue is still present in the latest version of VSCode and latest go lang version

@mejibyte
Copy link

I can also reproduce this. Any known workarounds?

@hbceylan
Copy link

I'm getting the same error.

1 tools failed to install.

gopkgs:
Error: Command failed: /usr/local/go/bin/go get -v github.com/uudashr/gopkgs/cmd/gopkgs
go: finding github.com/uudashr/gopkgs/cmd/gopkgs latest
go get: github.com/uudashr/gopkgs/cmd/gopkgs@v0.0.0-20191024034442-58e9141cd7d6 requires
	github.com/uudashr/gopkgs/v2@v2.1.0 requires
	github.com/uudashr/gopkgs@v0.0.0: reading github.com/uudashr/gopkgs/go.mod at revision v0.0.0: unknown revision v0.0.0
go: finding github.com/uudashr/gopkgs/cmd/gopkgs latest
go get: github.com/uudashr/gopkgs/cmd/gopkgs@v0.0.0-20191024034442-58e9141cd7d6 requires
	github.com/uudashr/gopkgs/v2@v2.1.0 requires
	github.com/uudashr/gopkgs@v0.0.0: reading github.com/uudashr/gopkgs/go.mod at revision v0.0.0: unknown revision v0.0.0

@sky4git
Copy link

sky4git commented Feb 16, 2020

Having the same error here. Installing Go first time.

go get github.com/uudashr/gopkgs/cmd/gopkgs@latest
go: finding github.com/uudashr/gopkgs/cmd/gopkgs latest
go get: github.com/uudashr/gopkgs/cmd/gopkgs@v0.0.0-20191024034442-58e9141cd7d6 requires
        github.com/uudashr/gopkgs/v2@v2.1.0 requires
        github.com/uudashr/gopkgs@v0.0.0: reading github.com/uudashr/gopkgs/go.mod at revision v0.0.0: unknown revision v0.0.0

@hairyhenderson
Copy link

@uudashr I think all that's necessary to fix this is to tag a v2.1.2 release. Right now https://github.com/uudashr/gopkgs/blob/master/go.mod references v2.1.2, but that doesn't exist.

@gaixianggeng
Copy link

try it in git bash!
export GO111MODULE=off && go get -u github.com/uudashr/gopkgs/cmd/gopkgs

@tkbeta
Copy link

tkbeta commented Feb 16, 2020

Not sure if it is a workaround, but it seems to get rid of when deploy Go on VSCode, by changing from:
GO111MODULE=on go get github.com/uudashr/gopkgs/cmd/gopkgs@latest
to:
GO111MODULE=on go get github.com/uudashr/gopkgs/cmd/gopkgs@v2

@warent
Copy link

warent commented Feb 16, 2020

This is broken for me as well

@nezorflame
Copy link
Contributor

nezorflame commented Feb 16, 2020

@uudashr can you please tag the current master with tag v2.1.2?
Also next time there are changes please make sure to set new tags as well. Having main go.mod in sync with the current tag in master is crucial.

@nezorflame
Copy link
Contributor

nezorflame commented Feb 16, 2020

BTW the proper way to consume the gopkgs now that it has v2 is:
go get github.com/uudashr/gopkgs/v2/cmd/gopkgs@latest
or
go get github.com/uudashr/gopkgs/v2/cmd/gopkgs@master
for master branch.

Once we confirm the tag worked, it needs to be used this way in VSCode as well.

@ahmadrasyidsalim
Copy link

I had the same error on Windows

Installing 5 tools at C:\Users\ahmad\go\bin in module mode.
  gocode
  gopkgs
  go-outline
  go-symbols
  goreturns

Installing github.com/mdempsky/gocode SUCCEEDED
Installing github.com/uudashr/gopkgs/cmd/gopkgs FAILED
Installing github.com/ramya-rao-a/go-outline SUCCEEDED
Installing github.com/acroca/go-symbols SUCCEEDED
Installing github.com/sqs/goreturns SUCCEEDED

1 tools failed to install.

gopkgs:
Error: Command failed: C:\Go\bin\go.exe get -v github.com/uudashr/gopkgs/cmd/gopkgs
go: finding github.com/uudashr/gopkgs/cmd/gopkgs latest
go: finding github.com/uudashr/gopkgs v2.0.1+incompatible
go: downloading github.com/uudashr/gopkgs v2.0.1+incompatible
go: downloading github.com/uudashr/gopkgs/cmd/gopkgs v0.0.0-20191024034442-58e9141cd7d6
go: extracting github.com/uudashr/gopkgs v2.0.1+incompatible
go: extracting github.com/uudashr/gopkgs/cmd/gopkgs v0.0.0-20191024034442-58e9141cd7d6
go get: github.com/uudashr/gopkgs/cmd/gopkgs@v0.0.0-20191024034442-58e9141cd7d6 requires
	github.com/uudashr/gopkgs/v2@v2.1.0 requires
	github.com/uudashr/gopkgs@v0.0.0: reading github.com/uudashr/gopkgs/go.mod at revision v0.0.0: unknown revision v0.0.0
go: finding github.com/uudashr/gopkgs/cmd/gopkgs latest
go: finding github.com/uudashr/gopkgs v2.0.1+incompatible
go: downloading github.com/uudashr/gopkgs v2.0.1+incompatible
go: downloading github.com/uudashr/gopkgs/cmd/gopkgs v0.0.0-20191024034442-58e9141cd7d6
go: extracting github.com/uudashr/gopkgs v2.0.1+incompatible
go: extracting github.com/uudashr/gopkgs/cmd/gopkgs v0.0.0-20191024034442-58e9141cd7d6
go get: github.com/uudashr/gopkgs/cmd/gopkgs@v0.0.0-20191024034442-58e9141cd7d6 requires
	github.com/uudashr/gopkgs/v2@v2.1.0 requires
	github.com/uudashr/gopkgs@v0.0.0: reading github.com/uudashr/gopkgs/go.mod at revision v0.0.0: unknown revision v0.0.0

@ghost
Copy link

ghost commented Feb 17, 2020

when i can updates about this error?

1 tools failed to install.

gopkgs:
Error: Command failed: /usr/local/go/bin/go get -v github.com/uudashr/gopkgs/cmd/gopkgs
go: finding github.com/uudashr/gopkgs/cmd/gopkgs latest
go: finding github.com/uudashr/gopkgs v2.0.1+incompatible
go: downloading github.com/uudashr/gopkgs v2.0.1+incompatible
go: downloading github.com/uudashr/gopkgs/cmd/gopkgs v0.0.0-20191024034442-58e9141cd7d6
go: extracting github.com/uudashr/gopkgs/cmd/gopkgs v0.0.0-20191024034442-58e9141cd7d6
go: extracting github.com/uudashr/gopkgs v2.0.1+incompatible
go get: github.com/uudashr/gopkgs/cmd/gopkgs@v0.0.0-20191024034442-58e9141cd7d6 requires
github.com/uudashr/gopkgs/v2@v2.1.0 requires
github.com/uudashr/gopkgs@v0.0.0: reading github.com/uudashr/gopkgs/go.mod at revision v0.0.0: unknown revision v0.0.0
go: finding github.com/uudashr/gopkgs/cmd/gopkgs latest
go: finding github.com/uudashr/gopkgs v2.0.1+incompatible
go: downloading github.com/uudashr/gopkgs v2.0.1+incompatible
go: downloading github.com/uudashr/gopkgs/cmd/gopkgs v0.0.0-20191024034442-58e9141cd7d6
go: extracting github.com/uudashr/gopkgs/cmd/gopkgs v0.0.0-20191024034442-58e9141cd7d6
go: extracting github.com/uudashr/gopkgs v2.0.1+incompatible
go get: github.com/uudashr/gopkgs/cmd/gopkgs@v0.0.0-20191024034442-58e9141cd7d6 requires
github.com/uudashr/gopkgs/v2@v2.1.0 requires
github.com/uudashr/gopkgs@v0.0.0: reading github.com/uudashr/gopkgs/go.mod at revision v0.0.0: unknown revision v0.0.0

@nezorflame
Copy link
Contributor

@uudashr reminder about v2.1.2 tag :)

@tresvitae
Copy link

Try to run "go get -v github.com/uudashr/gopkgs/cmd/gopkgs" in folder C:\Go\bin using Command Prompt, and VCS should work properly.

@ahmadrasyidsalim
Copy link

I don't know what going on, but for now it just work. v2.1.2 tag doesn't exist in: https://github.com/uudashr/gopkgs/tags

@uudashr
Copy link
Owner Author

uudashr commented Feb 18, 2020

Added release v2.1.2, but no luck

go: finding github.com/uudashr/gopkgs/cmd/gopkgs latest
go get: github.com/uudashr/gopkgs/cmd/gopkgs@v0.0.0-20191024034442-58e9141cd7d6 requires
	github.com/uudashr/gopkgs/v2@v2.1.0 requires
	github.com/uudashr/gopkgs@v0.0.0: reading github.com/uudashr/gopkgs/go.mod at revision v0.0.0: unknown revision v0.0.0

@nezorflame
Copy link
Contributor

Oh... I think I know the reason.
Try with GOPROXY=direct go get ...

@ahmadrasyidsalim
Copy link

@nezorflame 👍 I think GOPROXY=direct really is.

PS C:\Users\ahmad> $env:GO111MODULE="on"; $env:GOPROXY="direct"; go get -v github.com/uudashr/gopkgs/cmd/gopkgs@latest
go: finding github.com/uudashr/gopkgs/cmd latest
go: finding github.com/uudashr/gopkgs/cmd/gopkgs latest
go: finding github.com/uudashr/gopkgs v2.0.1+incompatible
go: downloading github.com/uudashr/gopkgs v2.0.1+incompatible
go: extracting github.com/uudashr/gopkgs v2.0.1+incompatible
go: finding github.com/karrick/godirwalk v1.15.3
go: finding github.com/pkg/errors v0.9.1
go: downloading github.com/karrick/godirwalk v1.15.3
go: downloading github.com/pkg/errors v0.9.1
go: extracting github.com/karrick/godirwalk v1.15.3
go: extracting github.com/pkg/errors v0.9.1
PS C:\Users\ahmad>

@nezorflame
Copy link
Contributor

nezorflame commented Feb 18, 2020

That's the problem then. Seems that Go proxy has cached the ./cmd/gopks module from the commit 58e9141 so every time anyone tries to pull the binary, they'll get the cached version which was broken.
Our options (except making VSCode consume v2 version as stated above) would be:

  • to return a separate go.mod to the binary package
  • to wait for the proxy.golang.org cache expiration (which is not guaranteed to fix the problem)

I'll research this when I have time.

@rhcarvalho
Copy link

Oh... I think I know the reason.
Try with GOPROXY=direct go get ...

Was the history of the repository changed? (push --force to master or a tag overwritten?)

@nezorflame
Copy link
Contributor

@rhcarvalho nope, see the post above yours

@nezorflame
Copy link
Contributor

nezorflame commented Feb 18, 2020

microsoft/vscode-go#3057 should fix the issue for the VSCode users with the github.com/uudashr/gopkgs/v2/cmd/gopkgs path.
As for the v1 path, we'll probably have to introduce the go.mod again to the ./cmd/gopkgs package.

@nezorflame
Copy link
Contributor

@fearform for now just install it manually from the v2 path:
go get github.com/uudashr/gopkgs/v2/cmd/gopkgs

@xenoliss
Copy link

xenoliss commented Feb 20, 2020

Hi there,

I apologize for the inconvenience but as a beginner trying to learn golang I'm not sure I get this answer from @nezorflame :

microsoft/vscode-go#3057 should fix the issue for the VSCode users with the github.com/uudashr/gopkgs/v2/cmd/gopkgs path.
As for the v1 path, we'll probably have to introduce the go.mod again to the ./cmd/gopkgs package.

I am using VScode as well but still have an error when trying to install the Analysis Tool as shown above :

go.toolsGopath setting is not set. Using GOPATH C:\Users\bapti\go
Installing 1 tool at C:\Users\bapti\go\bin in module mode.
  gopkgs

Installing github.com/uudashr/gopkgs/cmd/gopkgs FAILED

1 tools failed to install.

gopkgs:
Error: Command failed: C:\Go\bin\go.exe get -v github.com/uudashr/gopkgs/cmd/gopkgs
go: finding github.com/uudashr/gopkgs/cmd/gopkgs latest
go get: github.com/uudashr/gopkgs/cmd/gopkgs@v0.0.0-20191024034442-58e9141cd7d6 requires
	github.com/uudashr/gopkgs/v2@v2.1.0 requires
	github.com/uudashr/gopkgs@v0.0.0: reading github.com/uudashr/gopkgs/go.mod at revision v0.0.0: unknown revision v0.0.0
go: finding github.com/uudashr/gopkgs/cmd/gopkgs latest
go get: github.com/uudashr/gopkgs/cmd/gopkgs@v0.0.0-20191024034442-58e9141cd7d6 requires
	github.com/uudashr/gopkgs/v2@v2.1.0 requires
	github.com/uudashr/gopkgs@v0.0.0: reading github.com/uudashr/gopkgs/go.mod at revision v0.0.0: unknown revision v0.0.0

Could you please elaborate a bit more on the way to fix this issue ?

Thanks in advance,
Baptiste

@nezorflame
Copy link
Contributor

nezorflame commented Feb 21, 2020

@BaptisteOue same applies to your case.
Do not install it from the VSCode until the fix is merged, instead do this:

  • open cmd/PowerShell
  • go to some folder which doesn't contain Go code (otherwise you'll make changes to it), for example, your home folder
  • write in the command line:
    C:\Go\bin\go.exe get github.com/uudashr/gopkgs/v2/cmd/gopkgs to install the tool manually

@alexellis
Copy link

Someone pointed me here from Twitter - I get a pop-up in VSCode for 30s-2minutes every time I save files saying "applying formatting before save". They suggested it was due to this issue? https://twitter.com/dadideo/status/1232592177672355841?s=20

@nezorflame
Copy link
Contributor

@alexellis I doubt it since gopkgs should not be a save participant. It is only triggered on manual "Go: Add Imports" action AFAIK.

@jdowning100
Copy link

I ran go get github.com/uudashr/gopkgs/v2/cmd/gopkgs in my ~/go/bin/ path and that seems to have fixed vscode complaining, but now ctrl+click to open functions does not work. Also "Go to definition", "Go to type" and "Go to implementation" do not work for functions either.

@sirius1024
Copy link

goproxy=direct is working.
How about goproxy=proxyurl.com,direct ?

@nezorflame
Copy link
Contributor

@sirius1024 see my answer here

@nezorflame
Copy link
Contributor

nezorflame commented Feb 28, 2020

While the install issue with VSCode has been resolved in microsoft/vscode-go#3057 with the 0.13.1 release, I still need to fix the v1 import which I hopefully will have time for today/tomorrow.

EDIT: @nathanaelle seems to have already fixed this in #28, let's wait on the results for his PR.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests