-
Notifications
You must be signed in to change notification settings - Fork 2.3k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
gopls/internal/lsp: split ActivePackages
ActivePackages used to compute a set of packages, then type check them all, even though many clients need only metadata. This change replaces it by ActiveMetadata, which returns only metadata for the set of packages, and exposes the LoadPackages operation allowing callers to load only the subset they actually need. Details: - Snapshot.TypeCheck method is exposed. - Snapshot.DiagnosePackage now takes a PackageID, and calls for typechecking itself. Similarly Server.diagnosePkg. - source.Analyze now takes a PackageID, noot Package (which it previously used only for its ID). - GCOptimizationDetails accepts a Metadata, not a Package. - workspaceMetadata replaces workspacePackageID, activePackageIDs. - Combined the two loops in Server.diagnoseChangedFiles, and parallelized the diagnose calls in moddiagnostics, to ensure that type checking happens in parallel. Change-Id: Id0383a678ce45447f3313d1426e3f9b96050eaa1 Reviewed-on: https://go-review.googlesource.com/c/tools/+/456275 Reviewed-by: Robert Findley <rfindley@google.com> TryBot-Result: Gopher Robot <gobot@golang.org> gopls-CI: kokoro <noreply+kokoro@google.com> Run-TryBot: Alan Donovan <adonovan@google.com>
- Loading branch information
Showing
10 changed files
with
184 additions
and
153 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.