You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
gopls/internal/lsp/cache: clean up view workspace information
Tracking of workspace information in the View contained several
inconsistencies and redundancies. Clean this up, with the following
changes:
- eliminate the View.rootURI, opting to derive it instead
- eliminate the View.explicitGowork field, instead using the view.gowork
field and checking if it is outside of the workspace.
- eliminate many places where directory filters were interpreted
relative to the rootURI. This is wrong: directory filters are
expressed relative to the workspace folder.
- remove special handling of GOMODCACHE, now that we're on Go 1.16+
- rewrite the locateTemplateFiles function to use view.filterFunc and
filepath.WalkDir (now that we're on Go 1.16+).
- don't request goimports env vars when loading environment variables
for the view. They weren't being propagated to goimports anyway, and
goimports will load them as needed.
For golang/go#55331
Change-Id: I5e7f7e77e86d9ae425d2feaff31030278fed8240
Reviewed-on: https://go-review.googlesource.com/c/tools/+/459789
Reviewed-by: Alan Donovan <[email protected]>
gopls-CI: kokoro <[email protected]>
Run-TryBot: Robert Findley <[email protected]>
TryBot-Result: Gopher Robot <[email protected]>
0 commit comments