scala-xml-1 strips comments on load
armanbilge opened this issue · comments
==> X org.http4s.scalaxml.ScalaXmlSuite.round trips utf-83.458s munit.FailException: Failing seed: DnQ9OBcjAHkCfLgo7An2adTPVELxRySHaRbsQsgfceD=
You can reproduce this failure by adding the following override to your suite:
override def scalaCheckInitialSeed = "DnQ9OBcjAHkCfLgo7An2adTPVELxRySHaRbsQsgfceD="
Exception raised on property evaluation.
> ARG_0: <红麛鶣蓕塘羪><!--媀돊ߕ--></红麛鶣蓕塘羪>
> Exception: munit.ComparisonFailException: /home/runner/work/http4s-scala-xml/http4s-scala-xml/scala-xml/src/test/scala/org/http4s/scalaxml/ScalaXmlSuite.scala:66
65: .as[Elem]
66: .assertEquals(elem)
67: }
values are not the same
=> Obtained
<红麛鶣蓕塘羪/>
=> Diff (- obtained, + expected)
-<红麛鶣蓕塘羪/>
+<红麛鶣蓕塘羪><!--媀돊ߕ--></红麛鶣蓕塘羪>
Actually not sure if this was a flake.
This looks like a comment serialization issue.
I think it's scala/scala-xml@f92ae49. If we fix that, it will change the behavior of scala-xml-1. If we don't, we'll need to have two separate normalizing rules for the tests.
This is going to hurt. Let's put a switch in the test.
I'm actually not sure what needs to change where 😅 I've organized it in #29 so it should be easy to add separate sources/tests for each module, I think that's easier than a switch?
Yes, that already does the nasty build work. I appended a commit to #29 that should handle this discrepancy.
Fixed in #29