-
Notifications
You must be signed in to change notification settings - Fork 3.1k
Drop scala-xml as a dependency of compiler and REPL #6436
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
Conversation
|
Needs some test suite updating, but already worth a review pass. |
|
Note that that diff is irrelevant, as it shows the old version put the text that should show on the page into the |
|
Cc @ashawley |
|
I'm now working on using https://github.com/dagrejs for diagrams. The integration is pretty easy, but I've no clue on how to arrange the proper CSS :-) It generates diagrams from DOT files in the browser, which right now we're doing by translating them to SVG while generating scaladoc (or not, since it's buggy). |
|
I was taking a similar NIH route. Looking good! |
|
Thanks! The diagram work is ongoing here: https://github.com/adriaanm/scala/compare/xmlnininih...scaladoc-diags?expand=1 |
df76664 to
320ea77
Compare
|
This needs the scalacheck fixes in #6440. Did a minimal fix already |
|
Dropping scala-xml from the compiler is no longer necessary in sbt 1.1.2 and later, FWIW, see sbt/sbt#3405. Hopefully, the diagram work will continue on in some form. |
(note that there is no shortage of other reasons to want to do this, it will simplify our bootstrapping and publishing) |
ok, well that should be laid out in a new scala-dev issue? |
we've still got scala/bug#9560 |
|
I've taken the diagram port as far as I could. Nodes link to the corresponding pages, but some other fancy JS/CSS stuff is no longer supported. I think it looks pretty good. Give it a whirl! I think this undoes our xml knot. We do have some dependencies in the build, but it looks like most of them could be dropped. /cc @szeiger (for the obsolete ant compatibility parts re: pom files). There's also the intellij project gen -- could simple string replacement suffice there? |
Aren't these are in stb-land and not the build so sbt provides scala-xml bindings? |
15ac6e5 to
2531e33
Compare
9c965b1 to
a5fb71e
Compare
|
I tried to research if the scala-xml dependency in partest is even necessary in scala/scala-partest#104 |
|
Thanks @ashawley! In the interest of getting our build green, we should probably revert 5a582ce for now. We might still have some test cases in the scala/scala repo that need the xml library to be around. Those should be moved to scala/scala-xml. Let's do this work first (I put it on my list), then remove xml from the build when it's all done. |
I think we (Aaron, Adriaan, and I) already agreed to just remove any such test cases here on the assumption that they'd be re-added to scala-xml, there's no need to hold things up here in scala/scala over it, as far as I can see. Can't we just rip the scala-xml dependency out of partest? M4 isn't imminent. |
|
I'm available Thursday & Friday to work on it. |
|
That works for me, what ever causes the least friction. I personally think getting the build green first would be a good thing though, it removes stress. |
|
I understand now that I could have tested the bootstrap script changes first, before merging the PR, by pushing them to a branch here in in scala/scala, instead of my own fork, so that Travis-CI would notice them. Anyway, regardless, I'm testing a bootstrap fix now, it seems like it shouldn't be that hard to fix without having to actually revert anything... knock on wood... |
|
👍 thanks! |
|
bootstrap fix is #6563 |
|
I've added "and REPL" to the PR name since a not-obvious consequence of this is that XML literal syntax no longer works in the Scala REPL unless you explicitly put scala-xml on the classpath. 2.13.0-M32.13.x now |
|
now on my short-term to-do list: pushing this change through the scala-dist and scala-dist-smoketest repos. also, new scala-xml ticket on helping confused users wondering where scala-xml went: scala/scala-xml#212 |
|
meanwhile in the land of Dotty, scala/scala3#4394 |
|
How am I supposed to put scala-xml on the classpath? Or was this supposed to encourage a contribution of magic import to REPL? |
|
Yes to the latter. I'm more of a strategic thinker than one might think. |


To simplify boostrapping, we're going NIH on scala-xml.
Next step: remove usage in diagram generation, or maybe
move that to a d3 / dot JS client-side solution.
The diff on scaladoc for the core is minimal, using
a textconv à la:
(shas are part of locally published version)
The html diff in its entirety: