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
migrate Accept, Content-Type, Link, MediaType, MediaRange to cats-parse #4042
migrate Accept, Content-Type, Link, MediaType, MediaRange to cats-parse #4042
Conversation
7944257
to
97852bb
Compare
97852bb
to
f014f27
Compare
There is one test case failing, I can't figure out why: [error] x Do a round trip through the Accept header (102 ms)
[error] Accept: text/csv; quoteChar="'"; rowDelimiter=";"; escapeChar="\\\\\\\\"; charset="UTF-8"; columnDelimiter=" " != Accept: text/csv; quoteChar="'"; rowDelimiter=";"; escapeChar="\\\\"; charset="UTF-8"; columnDelimiter=" " (MediaTypeSpec.scala:55)
[error] org.http4s.MediaTypeSpec.$anonfun$new$16(MediaTypeSpec.scala:55)
[error] Actual: ..."\\\\[\\\\]"; ch...
[error] Expected: ..."\\\\[]"; ch... org.http4s.util.Writer#quote escapes every "\" with one more "\". |
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.
It looks like the parboiled2 version is returning a decoded quoted string, while the cats-parse version is returning the raw quoted string.
We can try to unescape it only for MediaType parser. |
I don't think Scala 3.0.0-M1 ever ran on JDK >= 14. We can ignore that error. While we're in flux, it would be nice to turn off the fail fast on CI. We're going to have a hard time getting any results here until we fix that. |
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.
I think I'd probably rather have the quotedString
helper take care of unescaping, but I'd need to spend more time making sure they always get interpreted the same way.
Hard to say given the current state of CI on these port branches, but I think this unblocks us? I'm
Yes, I agree that unquoting could be done nicely via separate parser. |
migrate to cats-parse:
Some tests fail due to few TODOs:
QValue parser from move ContentCoding, QValue and other headers to cats-parse #4013 needs to be merged firstPart of #3984