Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
cmd/go/internal/modload: use updateRequirements instead of editRequir…
…ements to add modules for missing packages editRequirements does a lot of work in order to respect the upper bounds of mustSelect, and as a result it doesn't provide many promises about conserving other things (like root dependencies). When we add modules for missing packages, we aren't dealing with upper bounds at all, so we would rather avoid the upper-bound overhead and preserve the root-dependency invariants instead. (*loader).updateRequirements does exactly that; it just needs to be told about the additional dependencies to add. For #36460 Change-Id: Ie0f2bc0dde18026bbd23e51357bb1d725d201680 Reviewed-on: https://go-review.googlesource.com/c/go/+/310791 Trust: Bryan C. Mills <bcmills@google.com> Run-TryBot: Bryan C. Mills <bcmills@google.com> Reviewed-by: Michael Matloob <matloob@golang.org> Reviewed-by: Jay Conrod <jayconrod@google.com>
- Loading branch information
Bryan C. Mills
committed
Apr 21, 2021
1 parent
5f1df26
commit 381252f
Showing
3 changed files
with
26 additions
and
16 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