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

Closed
iamcmnut opened this issue Feb 18, 2021 · 2 comments
Closed

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

iamcmnut opened this issue Feb 18, 2021 · 2 comments
Labels
FrozenDueToAge gopls Issues related to the Go language server, gopls. Tools This label describes issues relating to any tools in the x/tools repository. WaitingForInfo Issue is not actionable because of missing required information, which needs to be provided.

Comments

@iamcmnut
Copy link

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 Tools This label describes issues relating to any tools in the x/tools repository. gopls Issues related to the Go language server, gopls. labels 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

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?

@stamblerre stamblerre added the WaitingForInfo Issue is not actionable because of missing required information, which needs to be provided. label Feb 18, 2021
@stamblerre stamblerre added this to To Do in gopls on-deck Feb 28, 2021
@stamblerre
Copy link
Contributor

Closing this issue as there hasn't been any activity on it for a few weeks. Please open a new issue if this problem persists.

@stamblerre stamblerre removed this from the gopls/v1.0.0 milestone Mar 11, 2021
@stamblerre stamblerre moved this from To Do to Done in gopls on-deck Aug 12, 2021
@golang golang locked and limited conversation to collaborators Mar 11, 2022
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
FrozenDueToAge gopls Issues related to the Go language server, gopls. Tools This label describes issues relating to any tools in the x/tools repository. WaitingForInfo Issue is not actionable because of missing required information, which needs to be provided.
Projects
No open projects
Development

No branches or pull requests

3 participants