Skip to content

Commit 9b21a88

Browse files
committed
[gopls-release-branch.0.7] 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 <[email protected]> Run-TryBot: Robert Findley <[email protected]> gopls-CI: kokoro <[email protected]> TryBot-Result: Go Bot <[email protected]> Reviewed-by: Robert Findley <[email protected]> (cherry picked from commit 45eff0f) Reviewed-on: https://go-review.googlesource.com/c/tools/+/339096 Run-TryBot: Rebecca Stambler <[email protected]>
1 parent c923fbd commit 9b21a88

File tree

1 file changed

+0
-14
lines changed

1 file changed

+0
-14
lines changed

internal/lsp/cache/snapshot.go

Lines changed: 0 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -1843,20 +1843,6 @@ func (s *snapshot) clone(ctx, bgCtx context.Context, changes map[span.URI]*fileC
18431843
shouldLoad: v.shouldLoad || invalidateMetadata,
18441844
}
18451845
}
1846-
// Copy the URI to package ID mappings, skipping only those URIs whose
1847-
// metadata will be reloaded in future calls to load.
1848-
for k, ids := range s.ids {
1849-
var newIDs []packageID
1850-
for _, id := range ids {
1851-
if invalidateMetadata, ok := idsToInvalidate[id]; invalidateMetadata && ok {
1852-
continue
1853-
}
1854-
newIDs = append(newIDs, id)
1855-
}
1856-
if len(newIDs) != 0 {
1857-
result.ids[k] = newIDs
1858-
}
1859-
}
18601846

18611847
// Copy the set of initially loaded packages.
18621848
for id, pkgPath := range s.workspacePackages {

0 commit comments

Comments
 (0)