[pull] master from golang:master#1139
Merged
pull[bot] merged 14 commits intoareller:masterfrom Nov 10, 2021
Merged
Conversation
Currently, when a command scheduled by bgrun fails, bgwait returns to the caller even in case the fatal error was detected. In case of a syntax error in one of the standard packages, as an example, the runInstall function will try to read the generated archive file, only to fail since the file does not exist. Since the runInstall function is called in a goroutine, cmd/dist will continue to report errors until all background goroutines are done. Update the bgwait function to wait until program termination in case of a fatal error, since returning to the caller (with an error, as an example) will cause cmd/dist to report an additional error during the next build phase. Fixes #45410 Change-Id: If89976abad70f8d6ec79b2a5a1f2306e9c034c5a Reviewed-on: https://go-review.googlesource.com/c/go/+/320311 Run-TryBot: Ian Lance Taylor <iant@golang.org> TryBot-Result: Go Bot <gobot@golang.org> Reviewed-by: Ian Lance Taylor <iant@golang.org> Trust: Dmitri Shuralyov <dmitshur@golang.org>
Change-Id: I8a14b2fbb44f7ed1ea126cf27adc447f33fdf6f2 Reviewed-on: https://go-review.googlesource.com/c/go/+/313170 Reviewed-by: Bryan C. Mills <bcmills@google.com> Run-TryBot: Bryan C. Mills <bcmills@google.com> TryBot-Result: Go Bot <gobot@golang.org> Trust: Cherry Mui <cherryyz@google.com>
[ this is a roll-forward of golang.org/cl/357169 with minor changes to fix the cmd/go/internal/modload tests: because they don't run the go command, some initialization isn't run on the test and modroots is empty in cases it can't be when the full command setup is done. So directly check for workFilePath != "" instead of calling inWorkspaceMode which checks that Init is called first, and check that modRoots is non empty when calling mustGetSingleMainModule.] This change corrects a bug in the handling of module loading of workspaces. Namely, there is an assumption by the module pruning code that if a root module is selected then the packages of that module can be resolved without loading the whole module graph. This is not true in workspace mode because two workspace modules can require different versions of a dependency. Worse, one workspace module can directly require a depencency that is transitively required by another workspace module, changing the version of that module loaded in the fully expanded graph. To correct this, a new 'workspace' pruning mode is added where the roots are the workspace modules themselves, satisfying the assumption made by the module pruning logic. The rest of this change accounts for the new pruning mode where it's used and correctly sets the requirements in this pruning mode. Change-Id: I8bdf4b30f669c1ded0ed8a5dd202ac8d1939bbbd Reviewed-on: https://go-review.googlesource.com/c/go/+/362754 Trust: Michael Matloob <matloob@golang.org> Run-TryBot: Michael Matloob <matloob@golang.org> Reviewed-by: Bryan C. Mills <bcmills@google.com> TryBot-Result: Go Bot <gobot@golang.org>
In preparation for porting CL 361412, fix a discrepancy in go/types, where [-1]T is returned for an array type with invalid length. Change-Id: Ia32f5b66c9c561ccf0c32af1922fc4690c66dbc3 Reviewed-on: https://go-review.googlesource.com/c/go/+/362738 Trust: Robert Findley <rfindley@google.com> Run-TryBot: Robert Findley <rfindley@google.com> TryBot-Result: Go Bot <gobot@golang.org> Reviewed-by: Robert Griesemer <gri@golang.org>
This is a port of CL 361412 to go/types. Change-Id: Ie5bccc7faba7ca9230e712f867b27ca9dcddba79 Reviewed-on: https://go-review.googlesource.com/c/go/+/362739 Trust: Robert Findley <rfindley@google.com> Run-TryBot: Robert Findley <rfindley@google.com> TryBot-Result: Go Bot <gobot@golang.org> Reviewed-by: Robert Griesemer <gri@golang.org>
Change-Id: I09b22f05035700e1ed90bd066ee8f77c3913286a Reviewed-on: https://go-review.googlesource.com/c/go/+/358540 Trust: Michael Matloob <matloob@golang.org> Run-TryBot: Michael Matloob <matloob@golang.org> TryBot-Result: Go Bot <gobot@golang.org> Reviewed-by: Bryan C. Mills <bcmills@google.com>
Fixes #46323 Change-Id: Ibd624b1aaa15f907b7eb965b4eaec61018a45486 GitHub-Last-Rev: 7ad670b GitHub-Pull-Request: #47029 Reviewed-on: https://go-review.googlesource.com/c/go/+/332509 Trust: Ian Lance Taylor <iant@golang.org> Trust: Damien Neil <dneil@google.com> Reviewed-by: Damien Neil <dneil@google.com>
This is a port of CL 362118 to go/types, which is itself a roll-forward of CL 362254, containing a bugfix. Change-Id: I20067c7adf56bf64fe9ad080d998a7aefbdc1053 Reviewed-on: https://go-review.googlesource.com/c/go/+/362617 Trust: Robert Findley <rfindley@google.com> Run-TryBot: Robert Findley <rfindley@google.com> TryBot-Result: Go Bot <gobot@golang.org> Reviewed-by: Robert Griesemer <gri@golang.org>
This is a clean port of CL 362336 to go/types. Change-Id: Iafeae7024fbb2872b07748affcea9676324ea59e Reviewed-on: https://go-review.googlesource.com/c/go/+/362755 Trust: Robert Findley <rfindley@google.com> Run-TryBot: Robert Findley <rfindley@google.com> TryBot-Result: Go Bot <gobot@golang.org> Reviewed-by: Robert Griesemer <gri@golang.org>
Also, invert the boolean result. This matches Checker.validType; it's also easier to understand. Preparation for the next CL which detects cycles through type parameter lists. Change-Id: I00a75d2359ca20827c9bf406945508716c826fc4 Reviewed-on: https://go-review.googlesource.com/c/go/+/362336 Trust: Robert Griesemer <gri@golang.org> Reviewed-by: Robert Findley <rfindley@google.com>
…ter lists If we reach a generic type that is part of a cycle and we are in a type parameter list, we have a cycle through a type parameter list, which is invalid. Fixes #49439. Change-Id: Ia6cf97e1748ca0c0e61c02841202050091365b0b Reviewed-on: https://go-review.googlesource.com/c/go/+/361922 Trust: Robert Griesemer <gri@golang.org> Reviewed-by: Robert Findley <rfindley@google.com>
This is a port of CL 361922 to go/types. Change-Id: I790c8121a640c25fb655c926fb434d667dd59f76 Reviewed-on: https://go-review.googlesource.com/c/go/+/362756 Trust: Robert Findley <rfindley@google.com> Run-TryBot: Robert Findley <rfindley@google.com> TryBot-Result: Go Bot <gobot@golang.org> Reviewed-by: Robert Griesemer <gri@golang.org>
We already guard against this in the type checker, and it will eventually be allowed per the accepted proposal. Add a placeholder error code for the corresponding type checker error. Change-Id: I5cc2f1413ecc89ec2094f7178fdb156fb8cc2e43 Reviewed-on: https://go-review.googlesource.com/c/go/+/360235 Trust: Robert Findley <rfindley@google.com> Run-TryBot: Robert Findley <rfindley@google.com> TryBot-Result: Go Bot <gobot@golang.org> Reviewed-by: Robert Griesemer <gri@golang.org>
Change-Id: I71c29a2dc7e5b2b6bc35093535228d2907b16b47 Reviewed-on: https://go-review.googlesource.com/c/go/+/361595 Run-TryBot: Ian Lance Taylor <iant@golang.org> TryBot-Result: Go Bot <gobot@golang.org> Reviewed-by: Ian Lance Taylor <iant@golang.org> Trust: Hajime Hoshi <hajimehoshi@gmail.com>
This file contains hidden or 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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
See Commits and Changes for more details.
Created by
pull[bot]
Can you help keep this open source service alive? 💖 Please sponsor : )