My wisecrack about never upgrading to Scala 3 is really just a wisecrack. I'm sure we'll eventually migrate because libraries we use will, and because we'll eventually want the features ourselves to improve the code base.
Also, new developers learning Scala will want to learn the latest flavor thereof as well. I am worried about the scala 2.13 migration because it looks like substantial work, for *zero* end-user gain of functionality with DFDL. The gain in maintainability of Daffodil will come from rewriting parts of it to use the new features of Scala 3, as opposed to just "making it work" with Scala 2.13. Note that important frameworks, like Apache Spark, now are on scala 2.13, and though it took them over 2 years to do it, we do need to increase the priority of moving to scala 2.13. On Tue, Apr 5, 2022 at 12:12 PM Interrante, John A (GE Research, US) < [email protected]> wrote: > To be sure, upgrading Daffodil from Scala 2.12 to Scala 2.13 is a > prerequisite and that upgrade will be as much work as the upgrade from > Scala 2.13 to Scala 3.x so we're talking about two major efforts, not just > one. If Daffodil users are happy with Scala 2.12 and aren't requesting > support for Scala 2.13 or 3 yet, we don't have to prioritize 2.13 and once > we migrate to 2.13, we probably will have to keep cross compiling Daffodil > for both 2.12 and 2.13 for several releases before we begin migrating to > Scala 3. A lot of work has gone into making sure Scala 2.13 and Scala 3 > will remain binary compatible with each other to some degree, so remaining > on 2.13 for a long period of time won't hurt Daffodil users. However, I'm > curious why there would be any doubts we'll ever upgrade to Scala 3? > > Supposedly the migration will not be harder than moving from Scala 2.12 to > Scala 2.13 ( > https://docs.scala-lang.org/scala3/guides/migration/compatibility-intro.html) > and > will even be simpler in some respects due to the interoperability between > Scala 2.13 and Scala 3, although we'll have to replace all Scala 2 macros > with Scala 3 macros, scala-reflect calls with Java reflection or Scala 3 > metaprogramming, and XML literals with XML string interpolation ( > https://docs.scala-lang.org/scala3/reference/dropped-features/xml.html). > To be sure, we may have to wait a long time for XML string interpolation to > be ready since the XML interpolator project hasn't made a release yet ( > https://github.com/lampepfl/xml-interpolator). However, once these > problems are in the past, we will be able to use the new powerful features > of Scala 3 which have no equivalent in Scala 2 and even though Scala 3 > sources cannot be compiled with Scala 2.13 anymore, Scala 3 artifacts can > be consumed as dependencies in Scala 2.13. > > -----Original Message----- > From: GitBox <[email protected]> > Sent: Tuesday, April 5, 2022 7:17 AM > To: [email protected] > Subject: EXT: [GitHub] [daffodil] mbeckerle commented on pull request > #783: Update scala-xml to 2.1.0 > > Let's leave this PR open. I'll create a JIRA ticket for upgrade to > Scala XML 2.1.0 version. > > We really do have to look at this carefully. Scala XML support is > evolving radically in the transition from Scala 2.12 to 2.13 and 3.x. (I > have my doubts about whether we will ever upgrade to Scala 3 actually) > > OTOH: there are some annoying XML bugs that really do actually impact > DFDL schemas - e.g., scala xml not handling character 0xB properly, etc. > that actually are hard to work around for us. I'm hoping these are fixed in > scala xml 2.1.0. > > But that said, no point putting a great deal of work into fixing this > if it's all going to be scrap when we upgrade to a newer Scala. >
