You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
See guardian/scala-steward-public-repos#67 ... we're now running our Scala Steward workflow with Java 21 LTS, which means that all projects that want to have Scala Steward updates (like this one) need to be able to build under Java 21 (even if the projects are still running in production on Java 8).
An example of Scala Steward failing when trying to handle this repo is here:
[info] [launcher] getting org.scala-sbt sbt 1.5.8 (this may take some time)...
[info] [launcher] getting Scala 2.12.14 (for sbt)...
java.lang.ClassCastException: class java.lang.UnsupportedOperationException cannot be cast to class xsbti.FullReload (java.lang.UnsupportedOperationException is in module java.base of loader 'bootstrap'; xsbti.FullReload is in unnamed module of loader 'app')
For the buid to run under Java 21, a few things are easy, but some are a bit more involved:
Easy: Update Scala (2.12.18+) & sbt (1.9.0+)
Hard: Cope with updates to JAXB that come with Java 9 and above - the JAXB library is no longer a core part of Java, and the sbt-cxf plugin has not been updated in a long time and isn't compiled for that change. I think the best bet here may be to move to using scalaxb, which is maintained and can probably provide the WSDL/XML parsing that is required - it could be tricky though, let me know if you'd like to pair on it.
As noted in #327,
it looks like`salesforce-message-handler` needs to drop sbt-cxf to work with
versions of Java newer than Java 8 (the JAXB library is no longer a core part
of Java).
`scalaxb` (https://github.com/eed3si9n/scalaxb) looks like a good replacement
for `sbt-cxf`/[`wsdl2java`](https://cxf.apache.org/docs/wsdl-to-java.html),
it's maintained and has Scala-specific support:
https://index.scala-lang.org/eed3si9n/scalaxb/artifacts/scalaxb
The generated classes created by `scalaxb` are pretty similar to the ones
generated by `wsdl2java`, there was just a small wrinkle with
nillable id fields, which was not too hard to cope with.
See guardian/scala-steward-public-repos#67 ... we're now running our Scala Steward workflow with Java 21 LTS, which means that all projects that want to have Scala Steward updates (like this one) need to be able to build under Java 21 (even if the projects are still running in production on Java 8).
An example of Scala Steward failing when trying to handle this repo is here:
https://github.com/guardian/scala-steward-public-repos/actions/runs/8814650168/job/24194965264#step:6:1970
Unfortunately the Scala Steward run failing affects everyone, see guardian/scala-steward-public-repos#60 - so I've removed this repo from Scala Steward until this issue is fixed.
How to fix this issue?
For the buid to run under Java 21, a few things are easy, but some are a bit more involved:
sbt-cxf
plugin has not been updated in a long time and isn't compiled for that change. I think the best bet here may be to move to usingscalaxb
, which is maintained and can probably provide the WSDL/XML parsing that is required - it could be tricky though, let me know if you'd like to pair on it.cc @LAKSHMIRPILLAI @tomrf1
The text was updated successfully, but these errors were encountered: