-
Notifications
You must be signed in to change notification settings - Fork 645
Editor not looking at vendor folder it is ln -s
from other path
#1327
Comments
What is the folder that you have opened in VS Code? Can you try to open the folder to which you have symlinked? |
I start vscode by
|
And is For example, I symlinked |
for example:
|
That still doesn't tell me if you symlinked the folders at the |
project1 level I did mkdir -p src/github.com/kkpoon This worked well when vscode icon was orange. But not after I update vscode to blue icon version. Real path created by
|
When you hover over the tab after opening a file, you will get see the path of the file. Does this path correspond to the actual place where the code is or the location under GOPATH? |
It shows the actual path, which is not under |
that's the issue.. The Go extension depends on the file path (the one you see on the file tab) to determine the import path of the current package to use in the Can you try opening VS Code at |
I open vscode at $GOPATH/src/github.com/kkpoon. it shows the path under GOPATH and it works fine. Yet, it worked fine even I start vscode in symlink folder. Now, I have no idea whether this issue belongs to OS level (macos) or vscode or go extension. |
Ok, so to summarize
Is that right? |
opening vscode at |
I am having the exact same issue as @kkpoon that I have to open vs-code from one level up ($GOPATH/src/github.com/kkpoon in this case to work on project1) in order for go-plugin to read vendor directory. Note that I also created a symlink from my local workspace to GOPATH. And opening vs-code from the path under GOPATH. (using MacOS X Sierra with VSC 1.18.1) |
Also seem to be affected. When I open it one level above the symlink, the red underline changes to a green underline with the same error message. |
Looks like the green underline is coming from |
Same problem here. |
I've logged an upstream issue in vscode for this. microsoft/vscode#49315 |
It seems that microsoft/vscode#34627 is the current upstream issue that needs to be resolved in order for the debugging in symlinked directory to work. I suspect the Go community will be bumping into this the most. |
I've filed a general tracking issue for VS Code feature requests, so I'm going to close this in favor of that issue: golang/vscode-go#48. |
Project path at
$GOPATH/src/github.com/kkpoon/myproject
in the editor, the import statement is red underlined
mouseover one of it, for example
"github.com/rs/cors"
, showsin terminal, vscode integrated or outside vscode,
go build
success"github.com/rs/cors"
exists invendor
folderafter investigation, found
if project path is locate at
/some/path/outside/go/path/myproject
and
ln -s /some/path/outside/go/path/myproject
to$GOPATH/src/github.com/kkpoon/myproject
then go import statement is red underlined
if project code is really stored in
$GOPATH/src/github.com/kkpoon/myproject
vscode works as expected.
The text was updated successfully, but these errors were encountered: