joefitzgerald / go-plus

An Enhanced Go Experience For The Atom Editor
https://atom.io/packages/go-plus
Other
1.51k stars 128 forks source link

go-plus cannot find my gopath and no features work #386

Closed ghost closed 8 years ago

ghost commented 8 years ago

Operating system: Xubuntu 14.04

Atom version: 1.6.0

When I start Atom with a Go file open, three dialog boxes appear. A fourth appears after I right-click on a variable and select "rename symbol under cursor".

screenshot - 16-03-17 - 06 41 20 pm

When I click the "Run Go Get" button on each of the dialog boxes, they all become error messages:

screenshot - 16-03-17 - 06 40 49 pm

When I first went through this process upon installing Atom, I manually installed all the required packages myself through the terminal. When I did, the command was pasted as go get -ugolang.org/x/tools/cmd/goimports. Note the lack of a space between the u and the URL; is this an issue? In any case, in my gopath, ~/go, the /bin directory now contains all the executables the dialog boxes require:

screenshot - 16-03-17 - 06 46 32 pm

But the error still appears every time I start atom, and none of the features of go-plus work. The dialog boxes also appear in Atom Beta.

I went to the settings to configure the go-config package and feed it my gopath, but I cannot see any button to change its settings.

jasonwbarnett commented 8 years ago

System Info:

OS: Mac OS X 10.11.6 Go: 1.7.1 Atom: 1.10.2

Atom Error:

go: cannot find GOROOT directory: /private/var/folders/9y/ppk2fnqj5lscwqw_l6lhdrx8005bt1/T/appengine/go_appengine/goroot

How to reproduce:

  1. Download and install google's app engine go sdk.
  2. Make sure the SDK installed in step 1 is in your PATH before go (/usr/local/bin/go)
sbucek commented 8 years ago

Same problem. When running from command line GOROOT is not found anymore....

dmitrijs-balcers commented 8 years ago

Fixed on OSX Sierra. https://gist.github.com/vsouza/77e6b20520d07652ed7d Instead of ~/.bashrc I edited ~/.bash_profile

matuskacmar1 commented 7 years ago

image Mac OSX Sierra 10.12 Golang v1.7 Atom v1.12.2

I'm launching atom trough icon not trough terminal.

phantasm66 commented 7 years ago

Anyone experiencing this... the following will fix the issue: launchctl setenv GOPATH /Users/<username>/<your go workspace directory>

pathtrk commented 7 years ago

I already have set $GOPATH, So in my case

launchctl setenv GOPATH $GOPATH

fixed the issue. I can launch Atom through icon without error now.

joefitzgerald commented 7 years ago

This is related to some changes that I made to the core of Atom. An updated version of go-plus is forthcoming. In the interim, please launch atom from the terminal instead of via the dock/finder/spotlight.

deitch commented 7 years ago

@joefitzgerald so this is back? Can you confirm the version of go-plus in which it will be/is fixed, so we can confirm?

joefitzgerald commented 7 years ago

This is fixed again in v5.0.0 of go-plus.

deitch commented 7 years ago

@joefitzgerald hats off! I am updating right now.

deitch commented 7 years ago

Definitely works, @joefitzgerald thank you!

I had to update, restart atom, it then complained again about not finding them, but ran some internal updates, added some packages, one more restart, and then all ran smoothly.

joefitzgerald commented 7 years ago

Good to hear, thanks @deitch for validating!

muesli commented 7 years ago

Experiencing this again on latest Arch. Setting the GOPATH in the go-plus settings doesn't help either. Starting from terminal works.

joefitzgerald commented 7 years ago

@muesli what version of Atom and go-plus are you experiencing this with?

muesli commented 7 years ago

Atom 1.12.9 go-plus 5.1.0

joefitzgerald commented 7 years ago

Are you using a version of Atom downloaded from atom.io or are you using an unofficial distribution from webupd8team or similar?

muesli commented 7 years ago

It's the community/atom package from ArchLinux.

Also worth noting, that setting a manual GOPATH in go-plus config makes some of the parsing work, but tests e.g. still don't work. In that case the "Go" tab showing all the ENV vars also just shows "empty".

joefitzgerald commented 7 years ago

https://github.com/atom/design-decisions/blob/master/unofficial-atom-distributions.md

TL;DR... please download the official distribution and use that. If the issue is present with that, let me know.

muesli commented 7 years ago

Happy to try it out, even though this problem seems to have just started appearing with go-plus 5.1.0. No Atom updates were installed in the mean time.

pierrre commented 7 years ago

@muesli update your Atom I've got the same environment, no issue for me

muesli commented 7 years ago

@pierrre As I've mentioned, I'm on latest atom (now 1.13 in the meantime) and go-plus releases, and it's still happening here.

muesli commented 7 years ago

@joefitzgerald Tried the binary releases. Same behavior / issue though.