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
Deprecate DefaultCharset
, use UTF-8
directly
#5512
Deprecate DefaultCharset
, use UTF-8
directly
#5512
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Makes sense to me.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
👍🏻
@@ -34,6 +34,7 @@ package object http4s { | |||
|
|||
type ParseResult[+A] = Either[ParseFailure, A] | |||
|
|||
@deprecated("Use Charset.`UTF-8` directly", "0.22.8") |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
nitpick (non-blocking at all):
perhaps, in the 0.23
series a 'since' version should be different. It may be a bit odd — deprecated in 0.22.8
and not in 0.23.0
:)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yes, I think when Ross merges 0.22 -> 0.23 -> 1.0 he fixes these :)
The
DefaultCharset
alias served a purpose when it was introduced 6 years ago, but in 2021 anybody who has to think about charsets knows that UTF-8 is the universal default. By inlining it we remove the cognitive burden of needing to know thatDefaultCharset
is a global alias for UTF-8.