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

Cannot install gopkgs tool #3050

Closed
jedebarbieri opened this issue Feb 14, 2020 · 17 comments · Fixed by #3057
Closed

Cannot install gopkgs tool #3050

jedebarbieri opened this issue Feb 14, 2020 · 17 comments · Fixed by #3057
Labels

Comments

@jedebarbieri
Copy link

Hello, I can't install gopkgs and the "auto-completion" and "go to definition" feature are not working.

  • go version go1.13.7 windows/amd64
  • VS Code : 1.42.1
    c47d83b293181d9be64f27ff093689e8e7aed054
    x64
  • VS Code Go extension : v0.13.0
  • windows / amd64
  • settings.json:
    "go.formatTool": "goimports",
  1. Go to "GO: Install/Update Tools"
  2. Select "gopkgs"
  3. Wait until install finish. It shows me this error:
go.toolsGopath setting is not set. Using GOPATH C:\GoPath
Installing 1 tool at C:\GoPath\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

And a message "Analysis Tools Missing" is shown in the right bottom side:
image
And when I press "Install" button the process is repeated.

@stamblerre
Copy link
Contributor

I think you're running into this issue: uudashr/gopkgs#25. You can try downloading manually with modules turned off (GO111MODULE=off go get github.com/uudashr/gopkgs), but you may not get the correct version.

@nezorflame
Copy link
Contributor

nezorflame commented Feb 18, 2020

Yup, this is gopkgs issue.
@ramya-rao-a we're gonna need to update the tool installer to use v2 version of gopkgs. While we work on fixing the v1 import, tool has been updated a few months ago already so there's no point in consuming the old version anymore.

@nezorflame
Copy link
Contributor

Until the fix is merged, install it manually:
go get github.com/uudashr/gopkgs/v2/cmd/gopkgs

@metalim
Copy link

metalim commented Feb 22, 2020

Not again. #2857
How about NOT using unstable packages instead of waiting for upsteam fix in IDE everyone uses?

@nezorflame
Copy link
Contributor

nezorflame commented Feb 22, 2020

How about showing some respect to the people who make this work for free so that everyone can benefit from it instead?
No one is perfect: things happen, software breaks, we all learn from it and move forward.
While the gopkgs has issues and fixes has been slow, we are working on it. Hopefully this won't happen again.

@smaTc
Copy link

smaTc commented Feb 25, 2020

manual installation doesn't work for me somehow. Any ideas?

@hyangah
Copy link
Contributor

hyangah commented Feb 25, 2020

@smaTc is there any error message explaining why it doesn't work?

@smaTc
Copy link

smaTc commented Feb 25, 2020

@hyangah well not really. When I try to run my main it tells me: "found packages X and Y in /the/directory". But various imports are not working at all and half my project is red now in VS-Code.
How can I verify that it is installed or reinstall the tool or maybe all tools ?

Edit: Same Problem in Gopath and Module Variant

@smaTc
Copy link

smaTc commented Feb 25, 2020

Update: I don't even know if it is related but: if I remove all test files and therefore all Imports of the "testing" package my project is working again. Including the Imports etc. Does that make any sense to anyone here?

Second Update: Deleting and Cloning my git repo fixed the issue. Even though this was triggered after updating my go tools I am very confused and not sure if gopkgs was the problem at all.

@cdreier
Copy link

cdreier commented Feb 26, 2020

had the same issue, installing manually alone did not resolve it - after removing and reinstalling the vscode-go plugin everything works fine again!

@pierrre
Copy link

pierrre commented Feb 26, 2020

Is gopkgs useful if I'm using gopls ?

@nezorflame
Copy link
Contributor

nezorflame commented Feb 26, 2020

@pierrre yes if you're using command Go: Add Import to add imports manually.

@pierrre
Copy link

pierrre commented Feb 26, 2020

@nezorflame ok thank you 👍
I'm never using this command.
I use the gopls autocompletion, and it's still working fine.

@Wumms
Copy link

Wumms commented Feb 27, 2020

Finally (re-)enabling go.useLanguageServer fixed it for me (after manual install and reinstalling to vscode-go plugin) . No idea how it got disabled though.

@nezorflame
Copy link
Contributor

nezorflame commented Feb 27, 2020

@ramya-rao-a thanks! This one will probably require a patch release so that people stop having these errors.

@stamblerre
Copy link
Contributor

@nezorflame: Yep, @ramya-rao-a's planning on doing a patch release tomorrow.

@ramya-rao-a
Copy link
Contributor

Hey all,

Sorry for the radio silence, I've been on vacation and @stamblerre has been helping steer the ship in my absence :)

Thanks for all the work here @nezorflame!
The patch release of 0.13.1 has the fix to use v2 of gopkgs

Places where gopkgs is used other than code completion for packages when not using language server are

  • Go: Add Import command
  • Go: Browse Packages command

@vscodebot vscodebot bot locked and limited conversation to collaborators Apr 12, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Projects
None yet
Development

Successfully merging a pull request may close this issue.

10 participants