Replies: 6 comments 1 reply
-
The dependency resides in a legacy part of our code base we may be able to get rid of in the near future. Therefore I would prefer not to spend too much time on it. Happy new year! |
Beta Was this translation helpful? Give feedback.
-
The build errors relating to the scala.xml.pull part have been resolved by doing the above. There was another incompatibility: I subclassed scala.xml.parsing.NoBindingFactoryAdapter and called hStack.push(c) in one of the overridden methods to get Comment nodes in my resulting DOM. But mutable hStack has been replaced by a mutable reference to List[Node] so I replaced that with hStack ::= c hoping that will yield the same result (wild guess). This seems to work but it is supposed to handle an edge-case which I may not have touched with my superficial testing yet. It would be very helpful if someone could comment on the correctness of my assumption. The same goes for the xml.pull part. That is quite difficult to test in isolation in our application and is only still around to handle one legacy use case in a customers production environment. Not the best place to start testing so I will have to duplicate their environment and do some serious testing. Again, I will report back here. |
Beta Was this translation helpful? Give feedback.
-
That could be. You can see 39753a6 when mutable.Stack was dropped in favor of List to see what was done. Although, it looks like I used the :: operator and not ::= which might have been to ensure the items are prepend. It was a while ago, so I can't recall. |
Beta Was this translation helpful? Give feedback.
-
If you can't confidently upgrade your codebase to scala-xml 2.0, maybe you should opt out of the scala-xml 2.0 upgrade with Scala 2.12.17? Perhaps there are sbt settings for library dependencies that you can use so that you can just upgrade to Scala 2.12.17 but not get scala-xml 2.0? |
Beta Was this translation helpful? Give feedback.
-
I can confirm that there's nothing in scala-xml 2.0 that 2.12.17 actually needs, so I would expect Aaron's suggestion to work, as per my remark on scala/scala#10108 :
|
Beta Was this translation helpful? Give feedback.
-
2.1.0 works fine with 2.12.17. That's the version that 2.12.17 compiler depends on. |
Beta Was this translation helpful? Give feedback.
-
scala.xml.pull
was removed from scala-xml 2.0 (as per #193, #293, https://github.com/scala/scala-xml/blob/v2.0.0-M1/CHANGELOG.md).If you need a replacement, consider switching to
javax.xml.stream.events
; I've posted an example of migrating athttps://gist.github.com/SethTisue/2c84c855221bc5a31e129226ade2cb81
but also, @silviobierman asked:
Offhand, I would expect that to work. I can't be 100% sure without trying it, but as best I can recall, it's separate code that doesn't really interact with the rest of the library, so I would encourage you to give it a shot and report back on whether it works for you.
Beta Was this translation helpful? Give feedback.
All reactions