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

confusing message about multi-root setup #1848

Closed
MartinEmrich opened this issue Oct 19, 2021 · 8 comments
Closed

confusing message about multi-root setup #1848

MartinEmrich opened this issue Oct 19, 2021 · 8 comments

Comments

@MartinEmrich
Copy link

What version of Go, VS Code & VS Code Go extension are you using?

Version Information
  • Run go version to get version of Go from the VS Code integrated terminal.
    • go version go1.17 linux/amd64
  • Run gopls -v version to get version of Gopls from the VS Code integrated terminal.
    • (not installed)
  • Run code -v or code-insiders -v to get version of VS Code or VS Code Insiders.
    • 1.61.1 c13f1abb110fc756f9b3a6f16670df9cd9d4cf63 x64
  • Check your installed extensions to get the version of the VS Code Go extension
    • v0.28.1
  • Run Ctrl+Shift+P (Cmd+Shift+P on Mac OS) > Go: Locate Configured Go Tools command.
    • (lots of info including private information, folder names, etc., thus omitted)

Working on Windows with WSL remote in Debian 11 WSL2 environment.

Share the Go related settings you have added/edited

None, the message occured right after installing the vscode go extension.

Describe the bug

After installing the Go language extension, I get this message pop-up:

The Go language server is currently not supported in a multi-root set-up with different GOPATHs.

I have not set any "GOPATHs", I do not know what a "multi-root set-up" is in "Go speak". The messages gives me no clue on what to do next.

Steps to reproduce the behavior:

  1. Open VSCode workspace
  2. install Go extension
  3. See error

I assume this does not happen for everyone (or it would have been reported long ago), so a characteristic of my very workspace setup (many folders with different types of projects, repositories) might trigger this? But the message gives no hint on what to do to fix it.

@gopherbot gopherbot added this to the Untriaged milestone Oct 19, 2021
@hyangah
Copy link
Contributor

hyangah commented Oct 19, 2021

Can you please Run Ctrl+Shift+P (Cmd+Shift+P on Mac OS) > Go: Locate Configured Go Tools command, and share the output?

@MartinEmrich
Copy link
Author

@hyangah I tried that, the "Output" area in vcode filled with 1500+ lines of output. I kept the first part:

Checking configured tools....
GOBIN: undefined
toolsGopath: 
gopath: /home/xxxx/go
GOROOT: /usr/local/go
PATH: /home/xxxx/.vscode-server/bin/c13f1abb110fc756f9b3a6f16670df9cd9d4cf63/bin:/home/xxxx/.local/bin:/home/xxxx/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games:/usr/local/games:/mnt/c/Program Files (x86)/Microsoft SDKs/Azure/CLI2/wbin:/mnt/c/Program Files/Amazon Corretto/jdk11.0.12_7/bin:/mnt/c/Program Files (x86)/Amazon Corretto/jdk1.8.0_222/bin:/mnt/c/windows/system32:/mnt/c/windows:/mnt/c/windows/System32/Wbem:/mnt/c/windows/System32/WindowsPowerShell/v1.0/:/mnt/c/windows/System32/OpenSSH/:/mnt/c/ProgramData/chocolatey/bin:/mnt/c/Program Files/Git/cmd:/mnt/c/Program Files/dotnet/:/mnt/c/Program Files/Amazon/AWSCLIV2/:/mnt/c/Program Files/Kubernetes/Minikube:/mnt/c/Users/xxxx/AppData/Local/Microsoft/WindowsApps:/mnt/c/Users/xxxx/AppData/Local/Programs/Microsoft VS Code/bin:/usr/local/go/bin

	go:	/usr/local/go/bin/go: go version go1.17 linux/amd64

	gopkgs:	/home/xxxx/go/bin/gopkgs: go1.17
		path	github.com/uudashr/gopkgs/v2/cmd/gopkgs
		mod	github.com/uudashr/gopkgs/v2	v2.1.2	h1:A0+QH6wqNRHORJnxmqfeuBEsK4nYQ7pgcOHhqpqcrpo=
		dep	github.com/karrick/godirwalk	v1.12.0	h1:nkS4xxsjiZMvVlazd0mFyiwD4BR9f3m6LXGhM2TUx3Y=
		dep	github.com/pkg/errors	v0.8.1	h1:iURUrRGxPUNPdy5/HRSm+Yj6okJ6UtLINN0Q9M4+h3I=
	
	go-outline:	/home/xxxx/go/bin/go-outline: go1.17
		path	github.com/ramya-rao-a/go-outline
		mod	github.com/ramya-rao-a/go-outline	v0.0.0-20210608161538-9736a4bde949	h1:iaD+iVf9xGfajsJp+zYrg9Lrk6gMJ6/hZHO4cYq5D5o=
		dep	golang.org/x/tools	v0.1.1	h1:wGiQel/hW0NnEkJUk8lbzkX2gFJU6PFxf1v5OlCfuOs=
	
	gotests:	/home/xxxx/go/bin/gotests: go1.17
		path	github.com/cweill/gotests/gotests
		mod	github.com/cweill/gotests	v1.6.0	h1:KJx+/p4EweijYzqPb4Y/8umDCip1Cv6hEVyOx0mE9W8=
		dep	golang.org/x/tools	v0.0.0-20191109212701-97ad0ed33101	h1:LCmXVkvpQCDj724eX6irUTPCJP5GelFHxqGSWL2D1R0=
	
	gomodifytags:	/home/xxxx/go/bin/gomodifytags: go1.17
		path	github.com/fatih/gomodifytags
		mod	github.com/fatih/gomodifytags	v1.16.0	h1:B65npXIXSk44F6c1hZGE1NazSnt+eXvtdEOG2Uy+QdU=
		dep	github.com/fatih/camelcase	v1.0.0	h1:hxNvNX/xYBp0ovncs8WyWZrOrpBNub/JfaMvbURyft8=
		dep	github.com/fatih/structtag	v1.2.0	h1:/OdNE99OxoI/PqaW/SuSK9uxxT3f/tcSZgon/ssNSx4=
		dep	golang.org/x/tools	v0.0.0-20180824175216-6c1c5e93cdc1	h1:EAPsk8kfGCjxQagrkWjzXlUWe2p3gj5MknO+z2o9GKc=
	
	impl:	/home/xxxx/go/bin/impl: go1.17
		path	github.com/josharian/impl
		mod	github.com/josharian/impl	v1.1.0	h1:gafhg1OFVMq46ifdkBa8wp4hlGogjktjjA5h/2j4+2k=
		dep	golang.org/x/mod	v0.2.0	h1:KU7oHjnv3XNWfa5COkzUifxZmxp1TyI7ImMXqFxLwvQ=
		dep	golang.org/x/tools	v0.0.0-20200522201501-cb1345f3a375	h1:SjQ2+AKWgZLc1xej6WSzL+Dfs5Uyd5xcZH1mGC411IA=
		dep	golang.org/x/xerrors	v0.0.0-20191204190536-9bdfabe68543	h1:E7g+9GITq07hpfrRu66IVDexMakfv52eLZ2CXBWiKr4=
	
	goplay:	/home/xxxx/go/bin/goplay: go1.17
		path	github.com/haya14busa/goplay/cmd/goplay
		mod	github.com/haya14busa/goplay	v1.0.0	h1:ED4BMrGQ3WH7H3YXrcnWMVzj1xeSepaYTkLh1DtFi/4=
		dep	github.com/skratchdot/open-golang	v0.0.0-20200116055534-eef842397966	h1:JIAuq3EEf9cgbU6AtGPK4CTG3Zf6CKMNqf0MHTggAUA=
	
	dlv:	/home/xxxx/go/bin/dlv: go1.17
		path	github.com/go-delve/delve/cmd/dlv
		mod	github.com/go-delve/delve	v1.7.2	h1:QTDJlgx9OwUVYVm7xthyf2XHKrZcTQu3wkRbovktidM=
		dep	github.com/cosiner/argv	v0.1.0	h1:BVDiEL32lwHukgJKP87btEPenzrrHUjajs/8yzaqcXg=
		dep	github.com/cpuguy83/go-md2man/v2	v2.0.0	h1:EoUDS0afbrsXAZ9YQ9jdu/mZ2sXgT1/2yyNng4PGlyM=
		dep	github.com/derekparker/trie	v0.0.0-20200317170641-1fdf38b7b0e9	h1:G765iDCq7bP5opdrPkXk+4V3yfkgV9iGFuheWZ/X/zY=
		dep	github.com/google/go-dap	v0.5.1-0.20210713061233-c91b005e3987	h1:aghNk+kvabZ5I1OC3cNHWvfZ8svcoDLAGyKYimqyGVk=
		dep	github.com/hashicorp/golang-lru	v0.5.4	h1:YDjusn29QI/Das2iO9M0BHnIbxPeyuCHsjMW+lJfyTc=
		dep	github.com/mattn/go-isatty	v0.0.3	h1:ns/ykhmWi7G9O+8a448SecJU3nSMBXJfqQkl0upE1jI=
		dep	github.com/peterh/liner	v0.0.0-20170317030525-88609521dc4b	h1:8uaXtUkxiy+T/zdLWuxa/PG4so0TPZDZfafFNNSaptE=
		dep	github.com/russross/blackfriday/v2	v2.0.1	h1:lPqVAte+HuHNfhJ/0LC98ESWRz8afy9tM/0RK8m9o+Q=
		dep	github.com/shurcooL/sanitized_anchor_name	v1.0.0	h1:PdmoCO6wvbs+7yrJyMORt4/BmY5IYyJwS/kOiWx8mHo=
		dep	github.com/sirupsen/logrus	v1.6.0	h1:UBcNElsrwanuuMsnGSlYmtmgbb23qDR5dG+6X6Oo89I=
		dep	github.com/spf13/cobra	v1.1.3	h1:xghbfqPkxzxP3C/f3n5DdpAbdKLj4ZE4BWQI362l53M=
		dep	github.com/spf13/pflag	v1.0.5	h1:iy+VFUOCP1a+8yFto/drg2CJ5u0yRoB7fZw3DKv/JXA=
		dep	go.starlark.net	v0.0.0-20200821142938-949cc6f4b097	h1:YiRMXXgG+Pg26t1fjq+iAjaauKWMC9cmGFrtOEuwDDg=
		dep	golang.org/x/arch	v0.0.0-20190927153633-4e8777c89be4	h1:QlVATYS7JBoZMVaf+cNjb90WD/beKVHnIxFKT4QaHVI=
		dep	golang.org/x/sys	v0.0.0-20210514084401-e8d321eab015	h1:hZR0X1kPW+nwyJ9xRxqZk1vx5RUObAPBdKVvXPDUH/E=
		dep	gopkg.in/yaml.v2	v2.4.0	h1:D8xgwECY7CYvx+Y2n4sBz93Jn9JRvxdiyyo8CTfuKaY=
	
	dlv-dap:	/home/xxxx/go/bin/dlv-dap: go1.17
		path	github.com/go-delve/delve/cmd/dlv
		mod	github.com/go-delve/delve	v1.7.3-0.20211018201747-8ebd2d83aeef	h1:e3PFz+1uy/U/jpWsGAU5RwRlh1Bh6lFPBTnzwQQF0pU=
		dep	github.com/cosiner/argv	v0.1.0	h1:BVDiEL32lwHukgJKP87btEPenzrrHUjajs/8yzaqcXg=
		dep	github.com/cpuguy83/go-md2man/v2	v2.0.0	h1:EoUDS0afbrsXAZ9YQ9jdu/mZ2sXgT1/2yyNng4PGlyM=
		dep	github.com/derekparker/trie	v0.0.0-20200317170641-1fdf38b7b0e9	h1:G765iDCq7bP5opdrPkXk+4V3yfkgV9iGFuheWZ/X/zY=
		dep	github.com/google/go-dap	v0.6.0	h1:Y1RHGUtv3R8y6sXq2dtGRMYrFB2hSqyFVws7jucrzX4=
		dep	github.com/hashicorp/golang-lru	v0.5.4	h1:YDjusn29QI/Das2iO9M0BHnIbxPeyuCHsjMW+lJfyTc=
		dep	github.com/mattn/go-isatty	v0.0.3	h1:ns/ykhmWi7G9O+8a448SecJU3nSMBXJfqQkl0upE1jI=
		dep	github.com/mattn/go-runewidth	v0.0.3	h1:a+kO+98RDGEfo6asOGMmpodZq4FNtnGP54yps8BzLR4=
		dep	github.com/peterh/liner	v1.2.1	h1:O4BlKaq/LWu6VRWmol4ByWfzx6MfXc5Op5HETyIy5yg=
		dep	github.com/russross/blackfriday/v2	v2.0.1	h1:lPqVAte+HuHNfhJ/0LC98ESWRz8afy9tM/0RK8m9o+Q=
		dep	github.com/shurcooL/sanitized_anchor_name	v1.0.0	h1:PdmoCO6wvbs+7yrJyMORt4/BmY5IYyJwS/kOiWx8mHo=
		dep	github.com/sirupsen/logrus	v1.6.0	h1:UBcNElsrwanuuMsnGSlYmtmgbb23qDR5dG+6X6Oo89I=
		dep	github.com/spf13/cobra	v1.1.3	h1:xghbfqPkxzxP3C/f3n5DdpAbdKLj4ZE4BWQI362l53M=
		dep	github.com/spf13/pflag	v1.0.5	h1:iy+VFUOCP1a+8yFto/drg2CJ5u0yRoB7fZw3DKv/JXA=
		dep	go.starlark.net	v0.0.0-20200821142938-949cc6f4b097	h1:YiRMXXgG+Pg26t1fjq+iAjaauKWMC9cmGFrtOEuwDDg=
		dep	golang.org/x/arch	v0.0.0-20190927153633-4e8777c89be4	h1:QlVATYS7JBoZMVaf+cNjb90WD/beKVHnIxFKT4QaHVI=
		dep	golang.org/x/sys	v0.0.0-20210514084401-e8d321eab015	h1:hZR0X1kPW+nwyJ9xRxqZk1vx5RUObAPBdKVvXPDUH/E=
		dep	gopkg.in/yaml.v2	v2.4.0	h1:D8xgwECY7CYvx+Y2n4sBz93Jn9JRvxdiyyo8CTfuKaY=
	
	staticcheck:	/home/xxxx/go/bin/staticcheck: go1.17
		path	honnef.co/go/tools/cmd/staticcheck
		mod	honnef.co/go/tools	v0.2.1	h1:/EPr//+UMMXwMTkXvCCoaJDq8cpjMO80Ou+L4PDo2mY=
		dep	github.com/BurntSushi/toml	v0.3.1	h1:WXkYYl6Yr3qBf1K79EBnL4mak0OimBfB0XUf9Vl28OQ=
		dep	golang.org/x/mod	v0.3.0	h1:RM4zey1++hCTbCVQfnWeKs9/IEsaBLA8vTkd0WVtmH4=
		dep	golang.org/x/sys	v0.0.0-20210119212857-b64e53b001e4	h1:myAQVi0cGEoqQVR5POX+8RR2mrocKqNN1hmeMqhX27k=
		dep	golang.org/x/tools	v0.1.0	h1:po9/4sTYwZU9lPhi1tOrb4hCv3qrhiQ77LZfGa2OjwY=
		dep	golang.org/x/xerrors	v0.0.0-20200804184101-5ec99f83aff1	h1:go1bK/D/BFZV2I8cIQd1NKEZ+0owSTG1fDTci4IqFcE=
	
	gopls:	/home/xxxx/go/bin/gopls: go1.17
		path	golang.org/x/tools/gopls
		mod	golang.org/x/tools/gopls	v0.7.2	h1:kRKKdvA8GOzra8rhSFDClOR7hV/x8v0J0Vm4C/gWq8s=
		dep	github.com/BurntSushi/toml	v0.4.1	h1:GaI7EiDXDRfa8VshkTj7Fym7ha+y8/XxIgD2okUIjLw=
		dep	github.com/google/go-cmp	v0.5.6	h1:BKbKCqvP6I+rmFHt06ZmyQtvB8xAkWdhFyr0ZUNZcxQ=
		dep	github.com/sergi/go-diff	v1.1.0	h1:we8PVUC3FE2uYfodKH/nBHMSetSfHDR6scGdBi+erh0=
		dep	golang.org/x/mod	v0.4.2	h1:Gz96sIWK3OalVv/I/qNygP42zyoKp3xptRVCWRFEBvo=
		dep	golang.org/x/sync	v0.0.0-20210220032951-036812b2e83c	h1:5KslGYwFpkhGh+Q16bwMP3cOontH8FOep7tGV86Y7SQ=
		dep	golang.org/x/sys	v0.0.0-20210809222454-d867a43fc93e	h1:WUoyKPm6nCo1BnNUvPGnFG3T5DUVem42yDJZZ4CNxMA=
		dep	golang.org/x/tools	v0.1.6-0.20210908190839-cf92b39a962c	h1:C0nyHiBU2m0cR6hDiUORWqQIt3h37wsp1255QBSSXqY=
		dep	golang.org/x/xerrors	v0.0.0-20200804184101-5ec99f83aff1	h1:go1bK/D/BFZV2I8cIQd1NKEZ+0owSTG1fDTci4IqFcE=
		dep	honnef.co/go/tools	v0.2.0	h1:ws8AfbgTX3oIczLPNPCu5166oBg9ST2vNs0rcht+mDE=
		dep	mvdan.cc/gofumpt	v0.1.1	h1:bi/1aS/5W00E2ny5q65w9SnKpWEF/UIOqDYBILpo9rA=
		dep	mvdan.cc/xurls/v2	v2.3.0	h1:59Olnbt67UKpxF1EwVBopJvkSUBmgtb468E4GVWIZ1I=

I removed the ever-repeating listing of variables for each workspace folder to keep it brief here. If you're looking for something specific, just let me know.

@gopherbot
Copy link
Collaborator

Change https://golang.org/cl/356909 mentions this issue: goLanguageServer: print out all GOPATHs when there are multiple

gopherbot pushed a commit that referenced this issue Oct 19, 2021
Updates #1848

Change-Id: I482625276bd4dd8adefea90c0ae595c77abae48c
Reviewed-on: https://go-review.googlesource.com/c/vscode-go/+/356909
Trust: Rebecca Stambler <rstambler@golang.org>
Run-TryBot: Rebecca Stambler <rstambler@golang.org>
Reviewed-by: Suzy Mueller <suzmue@golang.org>
@suzmue
Copy link
Contributor

suzmue commented Oct 19, 2021

@MartinEmrich Could you please share your complete logs? It would be helpful to see how these variables differ between your workspace folders.

If you do not want to attach your complete logs, could you please include the following for each workspaceFolder?

GOBIN:
toolsGopath: 
gopath: 
GOROOT:
PATH: 

Thanks!

@MartinEmrich
Copy link
Author

The lower workspace part was huge (Its over 20 folders), so I removed duplicates:

 | sort | uniq

        AR="ar"
        CC="gcc"
        CGO_CFLAGS="-g -O2"
        CGO_CPPFLAGS=""
        CGO_CXXFLAGS="-g -O2"
        CGO_ENABLED="1"
        CGO_FFLAGS="-g -O2"
        CGO_LDFLAGS="-g -O2"
        CXX="g++"
        GCCGO="gccgo"
        GO111MODULE=""
        GOARCH="amd64"
        GOBIN=""
        GOCACHE="/home/xxxx/.cache/go-build"
        GOENV="/home/xxxx/.config/go/env"
        GOEXE=""
        GOEXPERIMENT=""
        GOFLAGS=""
        GOGCCFLAGS="-fPIC -m64 -pthread -fmessage-length=0 -fdebug-prefix-map=/tmp/go-build1130015071=/tmp/go-build -gno-record-gcc-switches"
        GOGCCFLAGS="-fPIC -m64 -pthread -fmessage-length=0 -fdebug-prefix-map=/tmp/go-build1182599717=/tmp/go-build -gno-record-gcc-switches"
        GOGCCFLAGS="-fPIC -m64 -pthread -fmessage-length=0 -fdebug-prefix-map=/tmp/go-build1202436044=/tmp/go-build -gno-record-gcc-switches"
        GOGCCFLAGS="-fPIC -m64 -pthread -fmessage-length=0 -fdebug-prefix-map=/tmp/go-build1251466786=/tmp/go-build -gno-record-gcc-switches"
        GOGCCFLAGS="-fPIC -m64 -pthread -fmessage-length=0 -fdebug-prefix-map=/tmp/go-build1322904859=/tmp/go-build -gno-record-gcc-switches"
        GOGCCFLAGS="-fPIC -m64 -pthread -fmessage-length=0 -fdebug-prefix-map=/tmp/go-build1412809236=/tmp/go-build -gno-record-gcc-switches"
        GOGCCFLAGS="-fPIC -m64 -pthread -fmessage-length=0 -fdebug-prefix-map=/tmp/go-build1414944680=/tmp/go-build -gno-record-gcc-switches"
        GOGCCFLAGS="-fPIC -m64 -pthread -fmessage-length=0 -fdebug-prefix-map=/tmp/go-build1663833795=/tmp/go-build -gno-record-gcc-switches"
        GOGCCFLAGS="-fPIC -m64 -pthread -fmessage-length=0 -fdebug-prefix-map=/tmp/go-build1781496122=/tmp/go-build -gno-record-gcc-switches"
        GOGCCFLAGS="-fPIC -m64 -pthread -fmessage-length=0 -fdebug-prefix-map=/tmp/go-build179772070=/tmp/go-build -gno-record-gcc-switches"
        GOGCCFLAGS="-fPIC -m64 -pthread -fmessage-length=0 -fdebug-prefix-map=/tmp/go-build1878479040=/tmp/go-build -gno-record-gcc-switches"
        GOGCCFLAGS="-fPIC -m64 -pthread -fmessage-length=0 -fdebug-prefix-map=/tmp/go-build1933488876=/tmp/go-build -gno-record-gcc-switches"
        GOGCCFLAGS="-fPIC -m64 -pthread -fmessage-length=0 -fdebug-prefix-map=/tmp/go-build2223557694=/tmp/go-build -gno-record-gcc-switches"
        GOGCCFLAGS="-fPIC -m64 -pthread -fmessage-length=0 -fdebug-prefix-map=/tmp/go-build2357868106=/tmp/go-build -gno-record-gcc-switches"
        GOGCCFLAGS="-fPIC -m64 -pthread -fmessage-length=0 -fdebug-prefix-map=/tmp/go-build2600363688=/tmp/go-build -gno-record-gcc-switches"
        GOGCCFLAGS="-fPIC -m64 -pthread -fmessage-length=0 -fdebug-prefix-map=/tmp/go-build2643357462=/tmp/go-build -gno-record-gcc-switches"
        GOGCCFLAGS="-fPIC -m64 -pthread -fmessage-length=0 -fdebug-prefix-map=/tmp/go-build2947991252=/tmp/go-build -gno-record-gcc-switches"
        GOGCCFLAGS="-fPIC -m64 -pthread -fmessage-length=0 -fdebug-prefix-map=/tmp/go-build3200582377=/tmp/go-build -gno-record-gcc-switches"
        GOGCCFLAGS="-fPIC -m64 -pthread -fmessage-length=0 -fdebug-prefix-map=/tmp/go-build3249176922=/tmp/go-build -gno-record-gcc-switches"
        GOGCCFLAGS="-fPIC -m64 -pthread -fmessage-length=0 -fdebug-prefix-map=/tmp/go-build3327991017=/tmp/go-build -gno-record-gcc-switches"
        GOGCCFLAGS="-fPIC -m64 -pthread -fmessage-length=0 -fdebug-prefix-map=/tmp/go-build3357360254=/tmp/go-build -gno-record-gcc-switches"
        GOGCCFLAGS="-fPIC -m64 -pthread -fmessage-length=0 -fdebug-prefix-map=/tmp/go-build3422374084=/tmp/go-build -gno-record-gcc-switches"
        GOGCCFLAGS="-fPIC -m64 -pthread -fmessage-length=0 -fdebug-prefix-map=/tmp/go-build3703334271=/tmp/go-build -gno-record-gcc-switches"
        GOGCCFLAGS="-fPIC -m64 -pthread -fmessage-length=0 -fdebug-prefix-map=/tmp/go-build3711512409=/tmp/go-build -gno-record-gcc-switches"
        GOGCCFLAGS="-fPIC -m64 -pthread -fmessage-length=0 -fdebug-prefix-map=/tmp/go-build3727455574=/tmp/go-build -gno-record-gcc-switches"
        GOGCCFLAGS="-fPIC -m64 -pthread -fmessage-length=0 -fdebug-prefix-map=/tmp/go-build3928689903=/tmp/go-build -gno-record-gcc-switches"
        GOGCCFLAGS="-fPIC -m64 -pthread -fmessage-length=0 -fdebug-prefix-map=/tmp/go-build3997670155=/tmp/go-build -gno-record-gcc-switches"
        GOGCCFLAGS="-fPIC -m64 -pthread -fmessage-length=0 -fdebug-prefix-map=/tmp/go-build4105154526=/tmp/go-build -gno-record-gcc-switches"
        GOGCCFLAGS="-fPIC -m64 -pthread -fmessage-length=0 -fdebug-prefix-map=/tmp/go-build4193189891=/tmp/go-build -gno-record-gcc-switches"
        GOGCCFLAGS="-fPIC -m64 -pthread -fmessage-length=0 -fdebug-prefix-map=/tmp/go-build4275287534=/tmp/go-build -gno-record-gcc-switches"
        GOGCCFLAGS="-fPIC -m64 -pthread -fmessage-length=0 -fdebug-prefix-map=/tmp/go-build482985976=/tmp/go-build -gno-record-gcc-switches"
        GOGCCFLAGS="-fPIC -m64 -pthread -fmessage-length=0 -fdebug-prefix-map=/tmp/go-build537526895=/tmp/go-build -gno-record-gcc-switches"
        GOGCCFLAGS="-fPIC -m64 -pthread -fmessage-length=0 -fdebug-prefix-map=/tmp/go-build696502706=/tmp/go-build -gno-record-gcc-switches"
        GOGCCFLAGS="-fPIC -m64 -pthread -fmessage-length=0 -fdebug-prefix-map=/tmp/go-build732759730=/tmp/go-build -gno-record-gcc-switches"
        GOGCCFLAGS="-fPIC -m64 -pthread -fmessage-length=0 -fdebug-prefix-map=/tmp/go-build900097580=/tmp/go-build -gno-record-gcc-switches"
        GOGCCFLAGS="-fPIC -m64 -pthread -fmessage-length=0 -fdebug-prefix-map=/tmp/go-build905676144=/tmp/go-build -gno-record-gcc-switches"
        GOHOSTARCH="amd64"
        GOHOSTOS="linux"
        GOINSECURE=""
        GOMODCACHE="/home/xxxx/go/pkg/mod"
        GOMOD="/dev/null"
        GONOPROXY=""
        GONOSUMDB=""
        GOOS="linux"
        GOPATH="/home/xxxx/go"
        GOPRIVATE=""
        GOPROXY="https://proxy.golang.org,direct"
        GOROOT="/usr/local/go"
        GOSUMDB="sum.golang.org"
        GOTMPDIR=""
        GOTOOLDIR="/usr/local/go/pkg/tool/linux_amd64"
        GOVCS=""
        GOVERSION="go1.17"
        PKG_CONFIG="pkg-config"

So no variables differ from each folder. I guess they are default values provided by vscode, as there is not a single Golang project in my workspace.

@hyangah
Copy link
Contributor

hyangah commented Oct 29, 2021

@MartinEmrich the latest version of vscode-go includes some helpful error message for debugging. Do you see any?
It's strange that the extension gets activated even without any go code in your workspace - maybe deep in a tree, there is a .go file and vscode thinks you need go extension. :-( If that's the case, please disable the extension for your workspace.

@MartinEmrich
Copy link
Author

@hyangah Thanks! after reinstalling the go extension, indeed the new version did put all assumed gopaths into the error message (sadly without the source of the gopath).
And indeed one egg was different, a Windows-style path long forgotten. After grepping through my entire $HOME; I found it deep in some old .vscode/settings.json file in one of the directories, which did not appear in the previous analysis.

And actually there is some Go code in my workspace, so the extension activating itself was no error. And after all, I intended to start a new go based project, which triggered the issue for me in the first place...

Finally, in the meantime I learned that "multi-root setup" is not a Golang concept, but rather a vscode concept, so now I understand what could be going on here.

So for me, the mystery is solved, the issue can be closed if necessary.

@findleyr
Copy link
Contributor

@MartinEmrich glad the mystery is solved, and thanks for following up!

@golang golang locked and limited conversation to collaborators Oct 29, 2022
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

5 participants