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

x/tools/gopls: outside GOPATH/src && module #44363

Open
iamcmnut opened this issue Feb 18, 2021 · 1 comment
Open

x/tools/gopls: outside GOPATH/src && module #44363

iamcmnut opened this issue Feb 18, 2021 · 1 comment

Comments

@iamcmnut
Copy link

@iamcmnut iamcmnut commented Feb 18, 2021

What version of Go are you using (go version)?

$ go version
go version go1.15.2 darwin/amd64

Does this issue reproduce with the latest release?

I'm not sure we didn't use the latest go version

What operating system and processor architecture are you using (go env)?

go env Output
$ go env
GO111MODULE=""
GOARCH="amd64"
GOBIN=""
GOCACHE="/Users/iamcmnut/Library/Caches/go-build"
GOENV="/Users/iamcmnut/Library/Application Support/go/env"
GOEXE=""
GOFLAGS=""
GOHOSTARCH="amd64"
GOHOSTOS="darwin"
GOINSECURE=""
GOMODCACHE="/Users/iamcmnut/go/pkg/mod"
GONOPROXY=""
GONOSUMDB=""
GOOS="darwin"
GOPATH="/Users/iamcmnut/go"
GOPRIVATE=""
GOPROXY="https://proxy.golang.org,direct"
GOROOT="/usr/local/go"
GOSUMDB="sum.golang.org"
GOTMPDIR=""
GOTOOLDIR="/usr/local/go/pkg/tool/darwin_amd64"
GCCGO="gccgo"
AR="ar"
CC="clang"
CXX="clang++"
CGO_ENABLED="1"
GOMOD="/Users/iamcmnut/tbox/projects/drex-microservices/gateway/go.mod"
CGO_CFLAGS="-g -O2"
CGO_CPPFLAGS=""
CGO_CXXFLAGS="-g -O2"
CGO_FFLAGS="-g -O2"
CGO_LDFLAGS="-g -O2"
PKG_CONFIG="pkg-config"
GOGCCFLAGS="-fPIC -m64 -pthread -fno-caret-diagnostics -Qunused-arguments -fmessage-length=0 -fdebug-prefix-map=/var/folders/4m/s6j4mh2d4wjf9wxj5jvwvsbh0000gn/T/go-build941263063=/tmp/go-build -gno-record-gcc-switches -fno-common"

What did you do?

I'm using vs code with Go extension and its show me these message
Error loading workspace: You are outside of a module and outside of $GOPATH/src. If you are using modules, please open your editor to a directory in your module. If you believe this warning is incorrect, please file an issue: https://github.com/golang/go/issues/new.

Screen Shot 2564-02-18 at 13 05 27

What did you expect to see?

It should not show this error and extension can jump to source file when I click the function

What did you see instead?

It shows many errors on the files, it looks like it can not find dependency files.

@seankhliao seankhliao changed the title Error loading workspace: You are outside of a module and outside of $GOPATH/src. If you are using modules, please open your editor to a directory in your module. If you believe this warning is incorrect, please file an issue x/tools/gopls: outside GOPATH/src && module Feb 18, 2021
@gopherbot gopherbot added this to the Unreleased milestone Feb 18, 2021
@stamblerre stamblerre modified the milestones: Unreleased, gopls/v1.0.0 Feb 18, 2021
@stamblerre
Copy link
Contributor

@stamblerre stamblerre commented Feb 18, 2021

Can you please share a gopls log by following the steps described here?

Is there any reason that you are working outside of your GOPATH and outside of a module?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
Linked pull requests

Successfully merging a pull request may close this issue.

None yet
3 participants