joefitzgerald/go-plus

After 2 Years Randomly MissingGo Tool!?!

bartlebee13 opened this issue · 6 comments

Prerequisites

  • Have you tried launching atom . from the terminal in your project's directory?
  • Have you verified the output from go env is correct? If it is, please include the output in this issue.
  • Have you updated Atom to the latest version?
  • Have you tried using Atom Beta, which can be run side-by-side with Atom Stable? Is the behavior the same, or different?
  • Have you updated your Atom packages to the latest versions?
  • Have you read the FAQ?
  • Have you searched the issues to see if others are experiencing the same issue?

Description

I've been using GO and atom as my IDE for almost 2 years and I did not change anything and all of a sudden one day the GO atom tool is not recognizing the Go runtime that I have installed. I checked my PATH and it has usr/local/go/bin I had been opening atom with a custom alias since I realized the vendor binaries weren't found unless I updated my gopath before I opened atom.

aias atom-combinedapi='GOPATH=$HOME/foldername/repositories/combinedapi; atom ~/foldername/repositories/combinedapi/src/foldername/combinedapi;'

Now no matter what I do, whether I open atom with that alias or without it, atom cannot find my go version at all.

screen shot 2018-12-14 at 2 25 28 pm

go version go1.8.3 darwin/amd64

Obviously I think this is something wrong with the environment variables or settings on my OS.

I've been using atom as my IDE for quite a while without issues and I believe this problem occurred after I upgraded my mac os to Mojave I'm on mac os x 10.14.1

process.env variables HERE:
GOPATH:"/Users/gumballdead/foldername/repositories/combinedapi"
PATH:"/Users/gumballdead/foldername/repositories/combinedapi/bin:/usr/local/go/bin:/Users/gumballdead/.pyenv/shims:/usr/local/bin:/usr/bin:/bin:/usr/sbin:/sbin:/usr/local/go/bin:/Users/gumballdead/sourcecode/gowork/bin:/Library/PostgreSQL/9.5/bin:/Users/gumballdead/foldername/repositories/combinedapi/bin:/.pyenv/bin:/Users/gumballdead/foldername/repositories/combinedapi/bin"

which go
/usr/local/go/bin/go

Output from atom -v && apm -v

Atom : 1.33.0
Electron: 2.0.11
Chrome : 61.0.3163.100
Node : 8.9.3

apm 2.1.2
npm 6.2.0
node 8.9.3 x64
atom 1.33.0
python 3.5.2
git 2.17.1

Output From go env

GOARCH="amd64"
GOBIN=""
GOEXE=""
GOHOSTARCH="amd64"
GOHOSTOS="darwin"
GOOS="darwin"
GOPATH="/Users/gumballdead/foldername/repositories/combinedapi"
GORACE=""
GOROOT="/usr/local/go"
GOTOOLDIR="/usr/local/go/pkg/tool/darwin_amd64"
GCCGO="gccgo"
CC="clang"
GOGCCFLAGS="-fPIC -m64 -pthread -fno-caret-diagnostics -Qunused-arguments -fmessage-length=0 -fdebug-prefix-map=/var/folders/0t/hgb0frn9283f8ftc40vdz1qc0000gn/T/go-build679646751=/tmp/go-build -gno-record-gcc-switches -fno-common"
CXX="clang++"
CGO_ENABLED="1"
PKG_CONFIG="pkg-config"
CGO_CFLAGS="-g -O2"
CGO_CPPFLAGS=""
CGO_CXXFLAGS="-g -O2"
CGO_FFLAGS="-g -O2"
CGO_LDFLAGS="-g -O2"

Steps to Reproduce

Launch Atom
Nothing GO works

I've looked over many issues

#743
joefitzgerald/go-config#30
#380

I've had gvm installed previously but I removed it and I also previously installed golang with homebrew but removed that installation as well so I'm really all out of options now.

Please let me know if there's something obvious that I'm missing.

Thank you.

zmb3 commented

Sorry that you’re having trouble - we should be able to get you back up and running though.

All the info provided here looks pretty normal to me. Would you be interested in jumping on a screen share with me so we can debug this together?

sure

What application do you normally use for screen sharing should I add you somewhere? skype/discord/slack?

zmb3 commented

Yeah, please find me at zmb3 in the gophers slack and we can work out a time.

zmb3 commented

Just to close the loop here - we leverage go env -json in order to validate that the executable we found is indeed the go tool. The -json flag was introduced in Go 1.9, so go-plus will not work with Go 1.8.

Go 1.8 is almost 2 years old, and many of the tools support only the latest 2 versions of Go, so it probably doesn't make sense to put a fix in here if it will just fail somewhere else.

What do you think @gumballdead - were you able to upgrade to a newer version of Go?

when I installed to a newer version of Go and pointed my atom PATH to use that one, some of the vendor files in my project were failing due to type mismatches with some of the older interfaces in the golang net library. I actually downgraded to go-plus 5.8.5 and I'm still using 1.8.3. After the holidays I'm going to update our project to a newer version of golang.

Thanks for your help Zac.