mirror of https://github.com/golang/go.git
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>
This commit is contained in:
parent
a66849847a
commit
45eff0fdb0
|
|
@ -1902,20 +1902,6 @@ func (s *snapshot) clone(ctx, bgCtx context.Context, changes map[span.URI]*fileC
|
|||
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 {
|
||||
|
|
|
|||
Loading…
Reference in New Issue