A Tour of Scala v2.0.1 Release Notes

Release Date: 2021-07-21 // over 2 years ago
  • Binary compatible with Scala XML 2.0.0.

    Published for Scala 2.12 and 2.13, Scala 3, Scala.js 1.6, and Scala Native 0.4.

    โž• Added

    • No new functionality.

    ๐Ÿ›  Fixed

    • ๐Ÿ›  Fixed runtime error for MarkupParser on Scala 3 by changing the access modifier of internal class, WithLookAhead (#542)

Previous changes from v2.0.0

  • Not binary compatible with Scala XML 1.3.0.

    Published for Scala 2.12, 2.13, and 3.0, Scala.js 1.5, and Scala Native 0.4.

    Artifacts are no longer published for Scala 2.11 and Scala.js 0.6.

    ๐Ÿšš A number of deprecated elements have been removed from the library; ๐Ÿ‘€ see the "Removed" section below. The library's JAR byte size is about 15% smaller.

    โž• Added

    • โž• Add scala.xml.transform.NestingTransformer, to apply a single rule recursively, to give the original behavior of RuleTransformer, see below.
    • ๐Ÿ“‡ The apiURL is now published in ivy metadata so that hyperlinks exist in downstream projects that reference Scala XML in their Scaladocs.
    • Declare version policy of with early-semver in Mima with sbt-version-policy plugin

    ๐Ÿ”„ Changed

    • ๐Ÿ”„ Changes to the default parser settings for the JDK SAXParser, see Safe parser defaults page on the wiki.
    • ๐Ÿ“œ The parser used by the load methods from scala.xml.XML and from scala.xml.factory.XMLLoader is now a ThreadLocal instance of SAXParser to reuse the parser instance and avoid repeatedly allocating one on every file load.
    • ๐Ÿ‘Œ Improve scala.xml.transform.RuleTransformer to apply all rules recursively.
    • Reject invalid comment text that ends in a dash (-) in scala.xml.Comment.
    • ๐Ÿ”„ Changed use of scala.collection.mutable.Stack in FactoryAdapter to a scala.collection.immutable.List. These members were affected.
      • attribStack
      • hStack
      • tagStack
      • scopeStack
    • ๐Ÿ‘€ The abstract class FactoryAdapter, see above, is used elsewhere within the library, as well, so the previous changes are also inherited by:
      • scala.xml.parsing.NoBindingFactoryAdapter implemented class
      • scala.xml.factory.XMLLoader.adapter static member

    ๐Ÿ›  Fixed

    • Attribute order is preserved for XML elements, not reversed.
    • Don't escape quotes in scala.xml.PCData and CDATA as an XML "

    โœ‚ Removed

    Most of these deletions are of vestigial code that is either unused, of poor quality or both. Very few users of Scala XML will even notice ๐Ÿšš the removed parts. Most users will not be affected.

    The deletions represent about 1500 lines of code (sloc). By comparison Scala XML is 10,000 sloc, so this is about 15% reduction in ๐Ÿ‘ sloc. The code that supports XML literals is maintained upstream in the Scala compiler, not in the Scala XML library.

    • โœ‚ Remove deprecated scala.xml.pull.XMLEventReader
    • โœ‚ Remove deprecated versions of scala.xml.Elem constructors
    • โœ‚ Remove deprecated scala.xml.Elem.xmlToProcess and scala.xml.Elem.processXml
    • โœ‚ Remove deprecated definitions under scala.xml.persistent
      • CachedFileStorage
      • Index
      • SetStorage
    • โœ‚ Remove scala.xml.dtd.impl.PointedHedgeExp
    • โœ‚ Remove scala.xml.dtd.Scanner
    • โœ‚ Remove scala.xml.dtd.ContentModelParser
    • โœ‚ Remove scala.xml.dtd.ElementValidator
    • โœ‚ Remove scala.xml.factory.Binder
    • โœ‚ Remove scala.xml.parsing.ValidatingMarkupHandler
    • โœ‚ Remove scala.xml.Properties
    • โœ‚ Remove scala.xml.factory.LoggedNodeFactory
    • โœ‚ Remove scala.xml.parsing.MarkupHandler.log