Closed fabianem closed 4 years ago
Yes, on Windows, VSCode-Go runs the executable $GOPATH/bin/gocode.exe
, but that's just because that's how executables are named on Windows. I believe that if you run go install
for gocode on Windows, gocode.exe
will be built.
Also, gocode only looks in the $GOPATH/pkg
folder for the architecture that you are on. So on, Windows, it will be $GOPATH/pkg/windows_amd64
, and on Ubuntu, it will be $GOPATH/pkg/linux_amd64
. Just to check, which architecture is the problem occurring on - both? What flags, if any, are you passing into gocode
?
Also, gocode only looks in the $GOPATH/pkg folder for the architecture that you are on. So on, Windows, it will be $GOPATH/pkg/windows_amd64, and on Ubuntu, it will be $GOPATH/pkg/linux_amd64.
Ok thx for the explanation. I feared so because thats what led me to the problem with building \github.com\miekg\pkcs11
on windows. Which is kinda difficult because I need to get libtools
working on windows - but I will think about this later :)
Just to check, which architecture is the problem occurring on - both?
Actually I tried it only on windows because thats where I run VScode. Ubuntu I use only as WSL on windows - so no gui here. Do you know of another option how I could try this on ubuntu wsl?
What flags, if any, are you passing into gocode?
I left all by default, so I guess I am passing none. But how could I verify this when using gocode in VScode?
Closing this issue, as this repository is in maintenance mode. For a better Go autocompletion experience, I would suggest using gopls
.
It also seems that https://github.com/mdempsky/gocode/issues/84 would be relevant here.
Setup
I am using: OS: windows 10 vs code: 1.30.1 go version: go1.11.4 windows/amd64 (and go1.11.1 linux/amd64 on WSL)
go env
on windows:go env
on WSL (ubuntu):Problem
Continuing issue #https://github.com/Microsoft/vscode-go/issues/2182
tl;dr: While using dep I am not receiving any intellisense for imported packages.
local packages:
external packages:
But after inserting the function manually, peek for definition works fine:
Also all necessary
.a
files exist:for windows_amd64:
for linux_amd64:
And just to understand it better I would like to ask again: When running vs code on windows, vs code is using
GOPATH/bin/gocode.exe
, right? And doesgocode.exe
searches only for the.a
files inGOPATH/pkg/windows_amd64
or also inGOPATH/pkg/linux_amd64
?