internal/lsp: remove duplicated loop that copies IDs
This logic was duplicated as part of the invalid metadata CL.
I believe the loop on L1873 is the intended behavior.
Change-Id: I93ceb3da4045f0536be7dc9da7cecc4323e14a92
Reviewed-on: https://go-review.googlesource.com/c/tools/+/339112
Trust: Rebecca Stambler <rstambler@golang.org>
Run-TryBot: Robert Findley <rfindley@google.com>
gopls-CI: kokoro <noreply+kokoro@google.com>
TryBot-Result: Go Bot <gobot@golang.org>
Reviewed-by: Robert Findley <rfindley@google.com>
diff --git a/internal/lsp/cache/snapshot.go b/internal/lsp/cache/snapshot.go
index a763f97..4f1bf19 100644
--- a/internal/lsp/cache/snapshot.go
+++ b/internal/lsp/cache/snapshot.go
@@ -1902,20 +1902,6 @@
shouldLoad: v.shouldLoad || invalidateMetadata,
}
}
- // Copy the URI to package ID mappings, skipping only those URIs whose
- // metadata will be reloaded in future calls to load.
- for k, ids := range s.ids {
- var newIDs []packageID
- for _, id := range ids {
- if invalidateMetadata, ok := idsToInvalidate[id]; invalidateMetadata && ok {
- continue
- }
- newIDs = append(newIDs, id)
- }
- if len(newIDs) != 0 {
- result.ids[k] = newIDs
- }
- }
// Copy the set of initially loaded packages.
for id, pkgPath := range s.workspacePackages {