Skip to content

Deprecate XML literals #19100

Open
Open
@SethTisue

Description

@SethTisue

@nicolasstucki seems like probably an oversight that there isn't already a ticket on this? (that I can find)

not sure what the right timetable is. at present, it doesn't even warn under -source:future

% scala-cli -S 3.nightly -source:future --dep org.scala-lang.modules::scala-xml:2.2.0
Welcome to Scala 3.4.0-RC1-bin-20231127-41e7d95-NIGHTLY-git-41e7d95 (17.0.9, Java OpenJDK 64-Bit Server VM).
Type in expressions for evaluation. Or try :help.
                                                                                                    
scala> <foo/>
val res0: scala.xml.Elem = <foo/>

at minimum, I think it should warn under -source:future, as the SIP committee has already authorized the eventual removal of XML literals from the language, and the Scala 3 reference doc already lists it under "Dropped Features" (https://docs.scala-lang.org/scala3/reference/dropped-features/xml.html)

whether it's time to actually deprecate, I don't have a strong opinion about. I don't know how polished or usable https://github.com/lampepfl/xml-interpolator is. the availability of a suitable substitute has always been the major concern here, iirc

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions