x/tools/gopls: fatal error: 'dirent.h' file not found when trying to install gopls/Go tools via Visual Studio Code #56663
Labels
gopls
Issues related to the Go language server, gopls.
NeedsInvestigation
Someone must examine and confirm this is a valid issue and not a duplicate of an existing one.
Tools
This label describes issues relating to any tools in the x/tools repository.
Milestone
gopls version
latest (unable to install)
go env
What did you do?
I am trying to install the Go tools in Visual Studio Code and am getting the following error when installing gopls complaining about dirent.h not found.
I know I have dirent.h because I see results in my local Xcode SDKs when running
find / -iregex ".*/dirent.h$" 2>/dev/null
.I am following the steps here: https://learn.microsoft.com/en-us/azure/developer/go/configure-visual-studio-code
My setup is:
All tools are installed successfully except for gopls. I have installed go via Homebrew and have also installed gopls via Homebrew but am not sure how to configure VSCode to point to this alternative gopls path.
What did you expect to see?
Installation Success
What did you see instead?
1 tools failed to install.
Editor and settings
Visual Studio Code
Version: 1.73.0 (Universal)
Commit: 8fa188b2b301d36553cbc9ce1b0a146ccb93351f
Date: 2022-11-01T15:38:50.881Z (1 wk ago)
Electron: 19.0.17
Chromium: 102.0.5005.167
Node.js: 16.14.2
V8: 10.2.154.15-electron.0
OS: Darwin x64 21.6.0
Sandboxed: No
Logs
Also asked on Stack Overflow: https://stackoverflow.com/q/74367673/2415822
The text was updated successfully, but these errors were encountered: