-
Notifications
You must be signed in to change notification settings - Fork 18.8k
Description
go version go1.15 windows/amd64
Version: 1.48.0 (user setup)
Commit: db40434f562994116e5b21c24015a2e40b2504e6
Date: 2020-08-13T07:50:42.600Z
Electron: 7.3.2
Chrome: 78.0.3904.130
Node.js: 12.8.1
V8: 7.8.279.23-electron.0
OS: Windows_NT x64 10.0.19041
Go extension 0.16.1
gopls version
golang.org/x/tools/gopls 0.4.4
golang.org/x/tools/[email protected] h1:8djGYsaZ0ByP0vaXg4T+mnyfDcHpWKSZ+tpQSGv9ahk=
I have a project with sub-module. The main repo contains api folder, so the main go.mod contain replace directive like:
replace {repo-url}/api => ./api
And I can not understand several things how to make extension to work as expected:
-
If I do not fix the api version manually, the go-command makes it version v0.0.0-00010101000000-000000000000, after
go mod tidy. But vscode-go despite ofreplaceand "special" module version value, opens old api-version references (ctrl+click) from globalpkg/mod/folder. Restarting the language server does not help to force using local api-folder. -
If I run
go get -uin module context to update api to latest available version (v0.2.0-prein my case) then the go.mod file is properly modified. BUT vscode-go continue to use old module version which is not required and is not exists in go.mod. Restarting the gopls, reloading vscode does not help - an older version of api-module is opened by ctrl+click on api-references.
What do I need to do to force extension work in this simple case? Who of them the vscode-go OR the gopls is ignoring the replace-directive?