Skip to content

Commit ba800b1

Browse files
committed
internal/lsp: ignore errors when finding workspace modules
Fixes golang/go#41558 Change-Id: If00cdb310575ac195ce8ebce7f156e0daa192b8d Reviewed-on: https://go-review.googlesource.com/c/tools/+/256578 Trust: Rebecca Stambler <[email protected]> Run-TryBot: Rebecca Stambler <[email protected]> gopls-CI: kokoro <[email protected]> TryBot-Result: Go Bot <[email protected]> Reviewed-by: Heschi Kreinick <[email protected]>
1 parent f5e916c commit ba800b1

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

internal/lsp/cache/session.go

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -256,8 +256,9 @@ func findWorkspaceModules(ctx context.Context, root span.URI, options *source.Op
256256
// Walk the view's folder to find all modules in the view.
257257
modules := make(map[span.URI]*moduleRoot)
258258
return modules, filepath.Walk(root.Filename(), func(path string, info os.FileInfo, err error) error {
259+
// Ignore any errors we may encounter while visiting files.
259260
if err != nil {
260-
return err
261+
return filepath.SkipDir
261262
}
262263
// For any path that is not the workspace folder, check if the path
263264
// would be ignored by the go command. Vendor directories also do not

0 commit comments

Comments
 (0)