-
Notifications
You must be signed in to change notification settings - Fork 17.7k
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
context: Breaking change in Go 1.15 not called out in the release notes #40737
Labels
Comments
dylan-bourque
changed the title
Breaking change in Go 1.15 not called out in the release notes
context: Breaking change in Go 1.15 not called out in the release notes
Aug 12, 2020
It would be nice if passing a |
Change https://golang.org/cl/248329 mentions this issue: |
Change https://golang.org/cl/248331 mentions this issue: |
gopherbot
pushed a commit
that referenced
this issue
Aug 13, 2020
…ontext package Fixes #40737 Change-Id: I8e2c1e1653d427af1ded6d61df1aa450e3c4d35c Reviewed-on: https://go-review.googlesource.com/c/go/+/248329 Run-TryBot: Andrew Bonventre <[email protected]> TryBot-Result: Gobot Gobot <[email protected]> Reviewed-by: Ian Lance Taylor <[email protected]> (cherry picked from commit b235317) Reviewed-on: https://go-review.googlesource.com/c/go/+/248331 Reviewed-by: Andrew Gerrand <[email protected]>
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
What version of Go are you using (
go version
)?Does this issue reproduce with the latest release?
Yes. This is a new issue introduced in Go 1.15.
What operating system and processor architecture are you using (
go env
)?go env
Output (using the `golang:1.15` Docker image)What did you do?
Run pre-existing code that was passing
nil
as the parent context tocontext.WithValue()
. Minimal example: https://play.golang.org/p/J0Bxux7Bfs6What did you expect to see?
The string "didn't panic" written to standard out
What did you see instead?
This change in behavior was introduced by 0205790. While I agree with the change in principle, I feel like this should have been specifically called out in the release notes for Go 1.15.
Updating
context.WithCancel()
,context.WithDeadline()
andcontext.WithValue()
to panic when they did not in Go 1.14 and prior will likely be a breaking change for users and, I feel, should be a highlighted change for visibility.The text was updated successfully, but these errors were encountered: