go-lang-plugin-org / go-lang-idea-plugin

Google Go language IDE built using the IntelliJ Platform
https://plugins.jetbrains.com/plugin/5047
Other
4.56k stars 570 forks source link

"The selected directory is not a valid home for Go SDK" #2893

Closed lsisoft closed 7 years ago

lsisoft commented 7 years ago

Investigation: Enabled logs with #com.goide.sdk.GoSdkService, got the logs: 2017-06-14 15:58:02,664 [ 256442] DEBUG - #com.goide.sdk.GoSdkService - Validating sdk path: /usr/lib/go1.8 2017-06-14 15:58:02,664 [ 256442] DEBUG - #com.goide.sdk.GoSdkService - Go executable found at /usr/lib/go1.8/bin/go 2017-06-14 15:58:02,664 [ 256442] DEBUG - #com.goide.sdk.GoSdkService - Cannot retrieve go version from zVersion file 2017-06-14 15:58:02,664 [ 256442] DEBUG - #com.goide.sdk.GoSdkService - Cannot retrieve version for sdk: /usr/lib/go1.8

src/runtime/zversion.go has been removed since Go 1.6, the go version can be retrieved by running the go executable.

Your issue description goes here. Please be as detailed as possible

Please include a go sample to reproduce the issue

Or include a screenshot / video of the issue.

lsisoft commented 7 years ago

Have tried to identify anything that looks like version:

find /usr/lib/go1.8 -iname *version* /usr/lib/go1.8/src/go/internal/gcimporter/testdata/versions /usr/lib/go1.8/src/go/internal/gccgoimporter/testdata/conversions.go /usr/lib/go1.8/src/go/internal/gccgoimporter/testdata/conversions.gox /usr/lib/go1.8/src/go/types/testdata/conversions2.src /usr/lib/go1.8/src/go/types/testdata/conversions.src /usr/lib/go1.8/src/go/types/conversions.go /usr/lib/go1.8/src/cmd/go/version.go /usr/lib/go1.8/src/runtime/internal/sys/zversion.go /usr/lib/go1.8/src/sort/zfuncversion.go /usr/lib/go1.8/VERSION /usr/lib/go1.8/local/src/golang.org/x/tools/go/internal/gccgoimporter/testdata/conversions.go /usr/lib/go1.8/local/src/golang.org/x/tools/go/internal/gccgoimporter/testdata/conversions.gox /usr/lib/go1.8/local/src/golang.org/x/tools/go/gcimporter15/testdata/versions

zolotov commented 7 years ago

/usr/lib/go1.8/src/runtime/internal/sys/zversion.go is still there. Please show what it contains

lsisoft commented 7 years ago

// auto generated by go tool dist

package sys

const DefaultGoroot = /usr/lib/go1.8 const TheVersion = go1.8.1-1-eqdr const Goexperiment = `` const StackGuardMultiplier = 1

lsisoft commented 7 years ago

Any ideas? Also, is it possible to not look for the zversion file but use call the go executable, with "go tool dist version" ?

zolotov commented 7 years ago

go1.8.1-1-eqdr is not expected version, what does eqdr mean?

lsisoft commented 7 years ago

Its a patched version of go 1.8.1 that was put together with various fixes people identified.

zolotov commented 7 years ago

At the moment IDE supports only google and appengine go versions.