Conversation
|
Since the 2.11.6 deadline is extremely nigh, I've tentatively postponed this PR (along with other recent ones) to 2.11.7. I'll make a pass through reviewed 2.11.7 PRs on Friday and move them back to 2.11.6 where feasible. In the mean time, feel free to let me know if you'd like some help getting this reviewed by then. |
There was a problem hiding this comment.
It would be nice to have a help text here, like we do in -language
|
looks great! just the few minor things mentioned above. |
|
@lrytz Thx! I'll break out the can of polish. |
XML Parser uses `scala.xml.PCData`. A compiler flag `-Yxml:coalescing`, analogous to `DocumentBuilderFactory.setCoalescing`, turns `PCData` nodes into `Text` nodes and coalesces sibling text nodes. This change also fixes parse errors such as rejecting a sequence of CDATA sections. A sequence of "top level" nodes are not coalesced. ``` scala> <a><b/>start<![CDATA[hi & bye]]><c/>world<d/>stuff<![CDATA[red & black]]></a> res0: scala.xml.Elem = <a><b/>start<![CDATA[hi & bye]]><c/>world<d/>stuff<![CDATA[red & black]]></a> scala> :replay -Yxml:coalescing Replaying: <a><b/>start<![CDATA[hi & bye]]><c/>world<d/>stuff<![CDATA[red & black]]></a> res0: scala.xml.Elem = <a><b/>starthi & bye<c/>world<d/>stuffred & black</a> ```
Update the test slightly to use the rig it inspired.
As long as Scala does XML literals, there is probably parsing behavior worth configuring. Therefore, the umbrella option is promoted to `-Xxml`. It was tempting to make it `-XML`, but we resisted.
|
Rebased, so it lost previous greenies. |
|
The (non-deterministic?) fail in b60de05 seems to imply we regressed somewhere (in the pattern matcher) -- diagnosing! Sorry about loss of green. Rebuilding to see whether it's stubborn. |
|
ff2c0bb seems to have a legit fail, though: |
|
I just commented above (outdatedly): Owner also redundant now It will stop after parser; assume it would proceed successfully thru typer. Or, maybe it won't print anything and fail the test. |
|
OK, next theory, the prodigal test is compiling Java code. How does that interact with phasing? he asked himself. I left the test overriding extra settings with |
Verbose option help and test tweak.
|
/rebuild |
|
Let's |
|
Is this test failure expected? https://scala-ci.typesafe.com/job/scala-2.11.x-integrate-bootstrap/112/artifact/logs/builds/*view*/ Test method: https://github.com/scala/scala-xml/blob/master/src/test/scala/scala/xml/XMLTest.scala#L441 Tracked as scala/scala-xml#51 |
|
I'll take a look. I guess it doesn't community-build per commit yet. |
|
Thank you! Unfortunately, this wasn't caught until late at night (in some timezone anyway). |
|
I commented on the other ticket that presumably Or, possibly, the previous behavior was just a bug, and the only people using scala-xml are the only people who want this feature to default to the correct behavior. |
|
I unfortunately can't speak for one or the other, knowing nothing of xml's knotty gritty except that it was one of Scala's hippest features at one point. |
|
I saw the slide show. OK, I'll re-open this ticket to preserve behavior, and add an issue to change it in 2.12. |
|
Much obliged </.> |
XML Parser uses
scala.xml.PCData.A compiler flag
-Yxml:coalescing, analogous toDocumentBuilderFactory.setCoalescing, turnsPCDatanodes into
Textnodes and coalesces sibling text nodes.This change also fixes parse errors such as rejecting a
sequence of CDATA sections.
A sequence of "top level" nodes is not coalesced.