-
Notifications
You must be signed in to change notification settings - Fork 645
vscode-go failing to update go tools #2897
Comments
This may very well be a bug in the way that vscode-go installs these tools, but I've never seen such an error before. @jayconrod - have you ever encountered something like this? |
Probably related to golang/go#35043, windows is wonderful like that. |
As a confirmation, reopening vs code asked for gopls update, and this time it reports the exact command failing, and as you supposed it's a rename. Here the output: Using the value d:\go from the go.toolsGopath setting. Installing golang.org/x/tools/gopls FAILED 1 tools failed to install. gopls: Doing the same command externally works, however |
@alfmos The errors you're seeing are reported by the go command after it extracts a module zip file, as it tries to move the extracted directory into place in the module cache. Could you take a quick look in the module cache and see if there is a permissions problem?
You can work around this by setting the Alternatively, you can clear the cache by running |
@OneOfOne I don't think golang/go#35043 is the cause. Module zip directories are not set to read-only until after they are renamed. I'm guessing the cache is either in some partial state it can't recover from or directories in it are owned by multiple users. |
cc @bcmills |
|
Reinstalled go 1.13 Installing golang.org/x/tools/gopls FAILED 1 tools failed to install. gopls: |
New try:
} Using the value d:\gocache from the go.toolsGopath setting. Installing golang.org/x/tools/gopls FAILED 1 tools failed to install. gopls: |
Finally, I have reverted to go 1.12 leaving d:\gocache as gopath, and I have some modules succeding and many others failing: Installing github.com/mdempsky/gocode FAILED 6 tools failed to install. gocode: dlv: gocode-gomod: godef: golint: gopls: |
@alfmos, what filesystem is your |
Ntfs |
@alfmos, what (if any) antivirus programs do you have running? (Is it possible that that or a similar local utility is pinning the directory?) |
@bcmills I have kaspersky. It seems unlikely to me that it blocks writing on a directory. |
@bcmills I tried without Kaspersky but no way. Same results |
I did another experiment. c:\go\bin\go.exe get -v -u golang.org/x/tools/gopls So maybe I should post the error to the golang repository? |
@alfmos: Glad you were able to update the tools. Just wanted to let you know that you shouldn't use the |
Small correction: with
@alfmos Feel free to open an issue there, and we can investigate further. I suspect that something is holding a file open in one of the directories being renamed. |
I had this error reproducing a few times
Tried deleting the History: I had usual installation vscode with gocode and others (working find, but, as you probably guessed - SUPER slowly), so I've seen this tempting suggestion about gopls, expected that it would work faster, but.. I clicked "update", it showed me a lot of 'Access is denied' and eventually that I need to reload window. Eventually at one of the runs, vscode finally did updated gopls and UPD: turned out I needed to open vscode exactly at the folder where go module was located, otherwise gopls does not work. Now navigation and intellisense work BLAZING FAST. I mean compared to the old gocode setup. I also later noticed that the same 'Access is denied' happened on other modules, like for example 'x/crypto'. And it happened while I've been running 'go build' and these modules were being installed. |
Thanks for the detail, @strowk! I agree that this sounds like an issue with Go and not with VS Code. I will close this issue, but please follow along with golang/go#36568 if this continues to affect you. |
What version of Go, VS Code & VS Code Go extension are you using?
go version go1.13.4 windows/amd64
code -v
orcode-insiders -v
to get version of VS Code or VS Code Insiders1.40.0
86405ea23e3937316009fc27c9361deee66ffbf5
x64
Name: Go
ID: ms-vscode.go
Description: Rich Go language support for Visual Studio Code
Version: 0.11.9
Editore: Microsoft
itemName=ms-vscode.Go
go env GOOS GOARCH
to get the operating system and processor arhcitecture detailswindows
amd64
Share the Go related settings you have added/edited
Describe the bug
I have manually upgraded go compiler to 1.13.4.
After this nothing works anymore
When I start Visual studio code it says it needs to update go tools.
Update starts but fails because all tools report "access is denied"
I I try debugging delve complains telling me that: "Version of Delve is too old for this version of Go (maximum supported version 1.12, suppress this error with --check-go-version=false)"
Steps to reproduce the behavior:
Screenshots or recordings
Output of tools update:
Using the value d:\go from the go.toolsGopath setting.
Installing 12 tools at d:\go\bin in module mode.
gocode
gopkgs
go-outline
go-symbols
guru
gorename
dlv
gocode-gomod
godef
goimports
golint
gopls
Installing github.com/mdempsky/gocode FAILED
Installing github.com/uudashr/gopkgs/cmd/gopkgs SUCCEEDED
Installing github.com/ramya-rao-a/go-outline FAILED
Installing github.com/acroca/go-symbols FAILED
Installing golang.org/x/tools/cmd/guru FAILED
Installing golang.org/x/tools/cmd/gorename FAILED
Installing github.com/go-delve/delve/cmd/dlv FAILED
Installing github.com/stamblerre/gocode FAILED
Installing github.com/rogpeppe/godef FAILED
Installing golang.org/x/tools/cmd/goimports FAILED
Installing golang.org/x/lint/golint FAILED
Installing golang.org/x/tools/gopls SUCCEEDED
10 tools failed to install.
gocode:
Error: Command failed: c:\go\bin\go.exe get -v github.com/mdempsky/gocode
go: finding github.com/mdempsky/gocode latest
go: finding golang.org/x/tools latest
go: downloading golang.org/x/tools v0.0.0-20191111154804-8cb0d02132ec
go: extracting golang.org/x/tools v0.0.0-20191111154804-8cb0d02132ec
build github.com/mdempsky/gocode: cannot load golang.org/x/tools/go/gcexportdata: rename d:\go\pkg\mod\golang.org\x\tools@v0.0.0-20191111154804-8cb0d02132ec.tmp-162181577 d:\go\pkg\mod\golang.org\x\tools@v0.0.0-20191111154804-8cb0d02132ec: Access is denied.
go: finding github.com/mdempsky/gocode latest
go: finding golang.org/x/tools latest
go: downloading golang.org/x/tools v0.0.0-20191111154804-8cb0d02132ec
go: extracting golang.org/x/tools v0.0.0-20191111154804-8cb0d02132ec
build github.com/mdempsky/gocode: cannot load golang.org/x/tools/go/gcexportdata: rename d:\go\pkg\mod\golang.org\x\tools@v0.0.0-20191111154804-8cb0d02132ec.tmp-162181577 d:\go\pkg\mod\golang.org\x\tools@v0.0.0-20191111154804-8cb0d02132ec: Access is denied.
go-outline:
Error: Command failed: c:\go\bin\go.exe get -v github.com/ramya-rao-a/go-outline
go: finding github.com/ramya-rao-a/go-outline latest
go: finding golang.org/x/tools latest
go: extracting golang.org/x/tools v0.0.0-20191111154804-8cb0d02132ec
build github.com/ramya-rao-a/go-outline: cannot load golang.org/x/tools/go/buildutil: rename d:\go\pkg\mod\golang.org\x\tools@v0.0.0-20191111154804-8cb0d02132ec.tmp-861491774 d:\go\pkg\mod\golang.org\x\tools@v0.0.0-20191111154804-8cb0d02132ec: Access is denied.
go: finding github.com/ramya-rao-a/go-outline latest
go: finding golang.org/x/tools latest
go: extracting golang.org/x/tools v0.0.0-20191111154804-8cb0d02132ec
build github.com/ramya-rao-a/go-outline: cannot load golang.org/x/tools/go/buildutil: rename d:\go\pkg\mod\golang.org\x\tools@v0.0.0-20191111154804-8cb0d02132ec.tmp-861491774 d:\go\pkg\mod\golang.org\x\tools@v0.0.0-20191111154804-8cb0d02132ec: Access is denied.
go-symbols:
Error: Command failed: c:\go\bin\go.exe get -v github.com/acroca/go-symbols
go: finding golang.org/x/tools latest
go: extracting golang.org/x/tools v0.0.0-20191111154804-8cb0d02132ec
build github.com/acroca/go-symbols: cannot load golang.org/x/tools/go/buildutil: rename d:\go\pkg\mod\golang.org\x\tools@v0.0.0-20191111154804-8cb0d02132ec.tmp-975959578 d:\go\pkg\mod\golang.org\x\tools@v0.0.0-20191111154804-8cb0d02132ec: Access is denied.
go: finding golang.org/x/tools latest
go: extracting golang.org/x/tools v0.0.0-20191111154804-8cb0d02132ec
build github.com/acroca/go-symbols: cannot load golang.org/x/tools/go/buildutil: rename d:\go\pkg\mod\golang.org\x\tools@v0.0.0-20191111154804-8cb0d02132ec.tmp-975959578 d:\go\pkg\mod\golang.org\x\tools@v0.0.0-20191111154804-8cb0d02132ec: Access is denied.
guru:
Error: Command failed: c:\go\bin\go.exe get -v golang.org/x/tools/cmd/guru
go: finding golang.org/x/tools latest
go: extracting golang.org/x/tools v0.0.0-20191111154804-8cb0d02132ec
go get golang.org/x/tools/cmd/guru: rename d:\go\pkg\mod\golang.org\x\tools@v0.0.0-20191111154804-8cb0d02132ec.tmp-321705022 d:\go\pkg\mod\golang.org\x\tools@v0.0.0-20191111154804-8cb0d02132ec: Access is denied.
go: finding golang.org/x/tools latest
go: extracting golang.org/x/tools v0.0.0-20191111154804-8cb0d02132ec
go get golang.org/x/tools/cmd/guru: rename d:\go\pkg\mod\golang.org\x\tools@v0.0.0-20191111154804-8cb0d02132ec.tmp-321705022 d:\go\pkg\mod\golang.org\x\tools@v0.0.0-20191111154804-8cb0d02132ec: Access is denied.
gorename:
Error: Command failed: c:\go\bin\go.exe get -v golang.org/x/tools/cmd/gorename
go: finding golang.org/x/tools latest
go: extracting golang.org/x/tools v0.0.0-20191111154804-8cb0d02132ec
go get golang.org/x/tools/cmd/gorename: rename d:\go\pkg\mod\golang.org\x\tools@v0.0.0-20191111154804-8cb0d02132ec.tmp-227549402 d:\go\pkg\mod\golang.org\x\tools@v0.0.0-20191111154804-8cb0d02132ec: Access is denied.
go: finding golang.org/x/tools latest
go: extracting golang.org/x/tools v0.0.0-20191111154804-8cb0d02132ec
go get golang.org/x/tools/cmd/gorename: rename d:\go\pkg\mod\golang.org\x\tools@v0.0.0-20191111154804-8cb0d02132ec.tmp-227549402 d:\go\pkg\mod\golang.org\x\tools@v0.0.0-20191111154804-8cb0d02132ec: Access is denied.
dlv:
Error: Command failed: c:\go\bin\go.exe get -v github.com/go-delve/delve/cmd/dlv
go: extracting github.com/go-delve/delve v1.3.2
go get github.com/go-delve/delve/cmd/dlv: rename d:\go\pkg\mod\github.com\go-delve\delve@v1.3.2.tmp-884088698 d:\go\pkg\mod\github.com\go-delve\delve@v1.3.2: Access is denied.
go: extracting github.com/go-delve/delve v1.3.2
go get github.com/go-delve/delve/cmd/dlv: rename d:\go\pkg\mod\github.com\go-delve\delve@v1.3.2.tmp-884088698 d:\go\pkg\mod\github.com\go-delve\delve@v1.3.2: Access is denied.
gocode-gomod:
Error: Command failed: c:\go\bin\go.exe get -v -d github.com/stamblerre/gocode
go: extracting github.com/stamblerre/gocode v1.0.0
go get github.com/stamblerre/gocode: rename d:\go\pkg\mod\github.com\stamblerre\gocode@v1.0.0.tmp-608084638 d:\go\pkg\mod\github.com\stamblerre\gocode@v1.0.0: Access is denied.
go: extracting github.com/stamblerre/gocode v1.0.0
go get github.com/stamblerre/gocode: rename d:\go\pkg\mod\github.com\stamblerre\gocode@v1.0.0.tmp-608084638 d:\go\pkg\mod\github.com\stamblerre\gocode@v1.0.0: Access is denied.
godef:
Error: Command failed: c:\go\bin\go.exe get -v github.com/rogpeppe/godef
go: extracting golang.org/x/tools v0.0.0-20181130195746-895048a75ecf
build github.com/rogpeppe/godef: cannot load golang.org/x/tools/go/ast/astutil: rename d:\go\pkg\mod\golang.org\x\tools@v0.0.0-20181130195746-895048a75ecf.tmp-281861802 d:\go\pkg\mod\golang.org\x\tools@v0.0.0-20181130195746-895048a75ecf: Access is denied.
go: extracting golang.org/x/tools v0.0.0-20181130195746-895048a75ecf
build github.com/rogpeppe/godef: cannot load golang.org/x/tools/go/ast/astutil: rename d:\go\pkg\mod\golang.org\x\tools@v0.0.0-20181130195746-895048a75ecf.tmp-281861802 d:\go\pkg\mod\golang.org\x\tools@v0.0.0-20181130195746-895048a75ecf: Access is denied.
goimports:
Error: Command failed: c:\go\bin\go.exe get -v golang.org/x/tools/cmd/goimports
go: finding golang.org/x/tools latest
go: extracting golang.org/x/tools v0.0.0-20191111154804-8cb0d02132ec
go get golang.org/x/tools/cmd/goimports: rename d:\go\pkg\mod\golang.org\x\tools@v0.0.0-20191111154804-8cb0d02132ec.tmp-789239246 d:\go\pkg\mod\golang.org\x\tools@v0.0.0-20191111154804-8cb0d02132ec: Access is denied.
go: finding golang.org/x/tools latest
go: extracting golang.org/x/tools v0.0.0-20191111154804-8cb0d02132ec
go get golang.org/x/tools/cmd/goimports: rename d:\go\pkg\mod\golang.org\x\tools@v0.0.0-20191111154804-8cb0d02132ec.tmp-789239246 d:\go\pkg\mod\golang.org\x\tools@v0.0.0-20191111154804-8cb0d02132ec: Access is denied.
golint:
Error: Command failed: c:\go\bin\go.exe get -v golang.org/x/lint/golint
go: finding golang.org/x/lint latest
go: extracting golang.org/x/tools v0.0.0-20190311212946-11955173bddd
build golang.org/x/lint/golint: cannot load golang.org/x/tools/go/ast/astutil: rename d:\go\pkg\mod\golang.org\x\tools@v0.0.0-20190311212946-11955173bddd.tmp-568541006 d:\go\pkg\mod\golang.org\x\tools@v0.0.0-20190311212946-11955173bddd: Access is denied.
go: finding golang.org/x/lint latest
go: extracting golang.org/x/tools v0.0.0-20190311212946-11955173bddd
build golang.org/x/lint/golint: cannot load golang.org/x/tools/go/ast/astutil: rename d:\go\pkg\mod\golang.org\x\tools@v0.0.0-20190311212946-11955173bddd.tmp-568541006 d:\go\pkg\mod\golang.org\x\tools@v0.0.0-20190311212946-11955173bddd: Access is denied.
The text was updated successfully, but these errors were encountered: