-
Notifications
You must be signed in to change notification settings - Fork 762
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Enable working on multi-module project without workspace #3007
Comments
I think this feature comes under the "zero-config gopls" umbrella, on which work is underway. |
@cletter7 you can add additional workspace folders manually in VS Code. I expect zero-config gopls to land in Q4 of this year (I'm resuming work on it as soon as [email protected] goes out). |
@findleyr could you please share more details on:
I have a bunch of modules in nested folders (not in the root folder of the repo) and I don't have a root |
@cletter7 you can set up vs code to have a workspace folder for each module. There is some documentation for this approach here: https://github.com/golang/tools/blob/master/gopls/doc/workspace.md#multiple-workspace-folders |
I'm going to close this as a dupe of golang/go#57979, which is one of my main priorities for the rest of the year. Please stay tuned! |
Is your feature request related to a problem? Please describe.
I am working on a monorepo with a bunch of go modules:
And in VS Code I get errors in the import section of the Go files:
Also, VS Code fails to go to the definition or show type on hover when working with the go files inside modules.
And I intentionally don't want to add workspace to the repo root. That's because the modules in the monorepo depend on different versions of same packages and there is no intention to keep those dependencies in sync. But if I enable go workspace then all those modules start to use the same version of the dependecy even though
go.mod
specifies another version. According to this comment this is by design:Describe the solution you'd like
I'd like VS Code to be able to work with modules even though they are not located in a root of the repo and even though there is no workspace (just like it works with frontend packages).
Describe alternatives you've considered
The text was updated successfully, but these errors were encountered: