Join GitHub today
GitHub is home to over 50 million developers working together to host and review code, manage projects, and build software together.Sign up
x/tools/gopls: doesn't handle replace directive #40836
go version go1.15 windows/amd64
Version: 1.48.0 (user setup)
Go extension 0.16.1
I have a project with sub-module. The main repo contains api folder, so the main go.mod contain
And I can not understand several things how to make extension to work as expected:
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?
@stamblerre I can not post logs of my private project. But I have completed some investigation for this issue. Primary, I have a big workspace for over 10 repos. Some of them is not yet updated to the latest dependencies versions and gopls logs contains errors just the same as
gopls currently requires that each workspace folder be in a single module. If you're opening a directory that contains multiple modules, you will see strange results like those you're describing. Instead, you can use the Add Folder to Workspace option in VS Code to add new folders that each are in a single module.