-
Notifications
You must be signed in to change notification settings - Fork 17.9k
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
x/tools/gopls: handle replace directives #36745
Comments
Fixed as of CL 239198, though VS Code does not support watching directories outside of the workspace root. |
Is this fixable, otherwise it seems to me that this means extending modules via the filesystem and package main is a better solution than replace and named modules? Not reliable on Windows unfortunately but workable on Unix systems. I guess the other option is unworkable (putting all projects in one module) as in my experience, a library change might make build errors unhelpful and will be a pain with so many files in scope. Edit: Actually replaced libs outside vscodes root, seems to work today, if you disable gopls. Arrgh still has some issues with build tags then. |
The title of this issue is a bit misleading--specifically, the issue is that on-disk changes to replaced modules will not be reflected to the editor because of limitations to VS Code's file watching API. |
I think one issue might be that more people are using replace than perhaps should be? "https://www.mail-archive.com/golang-nuts@googlegroups.com/msg41347.html" Not sure whether to file an issue about documentation somewhere? |
Replace directives should work with |
We watch all of the files in the module root for changes on-disk, and we also use changes to the current module as a heuristic for when it's necessary to rescan for imports. We should also track replace directives and watch file changes in replace targets.
The text was updated successfully, but these errors were encountered: