New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
go/packages: correctly handle context canceled #483
Conversation
This PR (HEAD: 96ea3e4) has been imported to Gerrit for code review. Please visit Gerrit at https://go-review.googlesource.com/c/tools/+/570796. Important tips:
|
Message from Gopher Robot: Patch Set 1: (1 comment) Please don’t reply on this GitHub thread. Visit golang.org/cl/570796. |
Message from Tim King: Patch Set 1: (1 comment) Please don’t reply on this GitHub thread. Visit golang.org/cl/570796. |
Message from Christian Stewart: Patch Set 1: (1 comment) Please don’t reply on this GitHub thread. Visit golang.org/cl/570796. |
Message from Tim King: Patch Set 1: (2 comments) Please don’t reply on this GitHub thread. Visit golang.org/cl/570796. |
96ea3e4
to
7043adb
Compare
This PR (HEAD: 7043adb) has been imported to Gerrit for code review. Please visit Gerrit at https://go-review.googlesource.com/c/tools/+/570796. Important tips:
|
Message from Christian Stewart: Patch Set 1: (3 comments) Please don’t reply on this GitHub thread. Visit golang.org/cl/570796. |
Message from Tim King: Patch Set 2: (2 comments) Please don’t reply on this GitHub thread. Visit golang.org/cl/570796. |
Message from Christian Stewart: Patch Set 2: (2 comments) Please don’t reply on this GitHub thread. Visit golang.org/cl/570796. |
Message from Tim King: Patch Set 2: (1 comment) Please don’t reply on this GitHub thread. Visit golang.org/cl/570796. |
Message from Michael Matloob: Patch Set 2: (2 comments) Please don’t reply on this GitHub thread. Visit golang.org/cl/570796. |
7043adb
to
d42480e
Compare
This PR (HEAD: d42480e) has been imported to Gerrit for code review. Please visit Gerrit at https://go-review.googlesource.com/c/tools/+/570796. Important tips:
|
d42480e
to
ea4efd1
Compare
This PR (HEAD: ea4efd1) has been imported to Gerrit for code review. Please visit Gerrit at https://go-review.googlesource.com/c/tools/+/570796. Important tips:
|
Message from Christian Stewart: Patch Set 2: (2 comments) Please don’t reply on this GitHub thread. Visit golang.org/cl/570796. |
Message from Christian Stewart: Patch Set 4: Code-Review+1 (1 comment) Please don’t reply on this GitHub thread. Visit golang.org/cl/570796. |
Message from Michael Matloob: Patch Set 4: (2 comments) Please don’t reply on this GitHub thread. Visit golang.org/cl/570796. |
Message from Christian Stewart: Patch Set 4: (2 comments) Please don’t reply on this GitHub thread. Visit golang.org/cl/570796. |
Message from Michael Matloob: Patch Set 4: (1 comment) Please don’t reply on this GitHub thread. Visit golang.org/cl/570796. |
Message from Tim King: Patch Set 4: (7 comments) Please don’t reply on this GitHub thread. Visit golang.org/cl/570796. |
Message from Michael Matloob: Patch Set 4: (1 comment) Please don’t reply on this GitHub thread. Visit golang.org/cl/570796. |
If the context is canceled for packages.Load, the following log message is written numerous times to stderr and returned as a load error per-package: internal error: error "context canceled" (*errors.errorString) without position packages.Load now checks if the context was canceled while parsing files and returns nil, ctx.Err() if so. parseFiles now will not create unnecessary goroutines when ctx is canceled. ld.Config.Context is equivalent to ld.Context as Config is an embedded struct within loader. Use ld.Context to refer to ld.Config.Context for consistency.
Message from Christian Stewart: Patch Set 4: (1 comment) Please don’t reply on this GitHub thread. Visit golang.org/cl/570796. |
ea4efd1
to
0d90ebb
Compare
Message from Christian Stewart: Patch Set 4: (7 comments) Please don’t reply on this GitHub thread. Visit golang.org/cl/570796. |
This PR (HEAD: 0d90ebb) has been imported to Gerrit for code review. Please visit Gerrit at https://go-review.googlesource.com/c/tools/+/570796. Important tips:
|
Message from Tim King: Patch Set 5: (3 comments) Please don’t reply on this GitHub thread. Visit golang.org/cl/570796. |
Message from Christian Stewart: Patch Set 5: Code-Review+1 (1 comment) Please don’t reply on this GitHub thread. Visit golang.org/cl/570796. |
Message from Tim King: Patch Set 5: (1 comment) Please don’t reply on this GitHub thread. Visit golang.org/cl/570796. |
Message from Christian Stewart: Patch Set 5: -Code-Review (1 comment) Please don’t reply on this GitHub thread. Visit golang.org/cl/570796. |
Message from Tim King: Patch Set 5: Hold+1 (1 comment) Please don’t reply on this GitHub thread. Visit golang.org/cl/570796. |
Superceded |
If the context is canceled for packages.Load, the following log message is
written numerous times to stderr and returned as a load error per-package:
internal error: error "context canceled" (*errors.errorString) without
position
packages.Load now checks if the context was canceled while parsing files and
returns nil, ctx.Err() if so.
parseFiles now will not create unnecessary goroutines when ctx is canceled.
ld.Config.Context is equivalent to ld.Context as Config is an embedded struct
within loader. Use ld.Context to refer to ld.Config.Context for consistency.