Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

VS Code + Go extension: Turn off Workspace loading

I am using the primary Go extension. I use VS Code a lot, but I am only rarely working in Go. I also use Azure, but I do not use or want the SDK associated with Go.

After installing the extension, I see the following error:

Error loading workspace: err: exit status 1: stderr: go: github.com/Azure/[email protected]+incompatible: missing go.sum entry; to add it: go mod download github.com/Azure/azure-sdk-for-go : packages.Load error

I think I understand the error and the problem, but I do not know how I can tell VS Code, "hey, I don't want the Azure Go SDK."

What do I need to do in VS Code to be able to flag that I do not want this, or to turn it off? Right now, the error shows those spinning arrows of death, which makes me think that there is a background task that keeps searching for the Azure SDK. Regardless, I would rather not have bogus errors cluttering my IDE.

like image 707
Mike Williamson Avatar asked Aug 15 '26 20:08

Mike Williamson


1 Answers

Regardless whether you want Azure Go SDK or not, the Go code in your project is already using github.com/Azure/[email protected]+incompatible and the extension (&gopls&go) needs it to process the code in the project. It is a real error.

If you are sure that your code shouldn't depend on it, please remove the reference to it from your go code and go.mod file, and reload the window.

like image 86
Hana Avatar answered Aug 18 '26 13:08

Hana



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!