-
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.
go/packages: stop loading packages when context is done
The value of ld.Context.Err() is now always checked once at the beginning of loadPackage before it begins reading files or exportdata. loadPackage stops early if ld.Context is done. If any packages failed to load due to stopping early, Load returns (nil, ld.Context.Err()). As a side-effect, this resolves logging ld.Context.Err() multiple times per packages as unknown internal errors. (These are not internal errors nor are they unknown.) Change-Id: Iab8eedbe19ad07b592b3003d2934b20039e54a94 Reviewed-on: https://go-review.googlesource.com/c/tools/+/577395 Reviewed-by: Alan Donovan <[email protected]> LUCI-TryBot-Result: Go LUCI <[email protected]>
- Loading branch information
1 parent
dcccb2d
commit dd0410f
Showing
1 changed file
with
25 additions
and
10 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