Skip to content

Scala 3.4 with "-source:future" fails to compile xml literals #22223

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
goshacodes opened this issue Dec 17, 2024 · 1 comment
Closed

Scala 3.4 with "-source:future" fails to compile xml literals #22223

goshacodes opened this issue Dec 17, 2024 · 1 comment
Labels
area:xml Issues tied with scala-xml. itype:meta Issues about process/similar stat:duplicate

Comments

@goshacodes
Copy link

goshacodes commented Dec 17, 2024

Compiler version

3.4.2
"-source:future"

Minimized code

val xml = <foo></foo>

Output

XML literals are no longer supported. See https://docs.scala-lang.org/scala3/reference/dropped-features/xml.html

Expectation

Compiles since there is no stable solution. Only some semester project from 2019 with no documentation.

Will it be merged to the language? Or will it exist as a standalone library?

@goshacodes goshacodes added itype:bug stat:needs triage Every issue needs to have an "area" and "itype" label labels Dec 17, 2024
@Gedochao Gedochao added area:xml Issues tied with scala-xml. stat:needs info itype:meta Issues about process/similar and removed stat:needs triage Every issue needs to have an "area" and "itype" label itype:bug labels Dec 18, 2024
@Gedochao
Copy link
Contributor

Hey, so this is technically a duplicate of #19100.
The migration warning you're seeing has been added in #19101 and it works as expected.

Compiling with -source:future means you get all of the stuff that we already know would happen down the road, but there doesn't have to be a specific timeline for this.
We do plan to deprecate XML literals at some point, thus the error you're getting with -source:future is valid.
However, there is no alternative to scala-xml at this point in time.
Please notice that we haven't deprecated it in 3.6.x series, and neither do we plan to do so in 3.7.x at this point.

Compiles since there is no stable solution.

It's -source:future, so there doesn't have to be a stable solution in place just yet.

Will it be merged to the language? Or will it exist as a standalone library?

We will likely merge the interpolator back to scala-xml sometime in 2025. Beyond that, hard to say just yet.
When the roadmap becomes set in stone, an announcement will be made.

Closing this, let's track this in #19100.

@Gedochao Gedochao closed this as not planned Won't fix, can't repro, duplicate, stale Dec 18, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area:xml Issues tied with scala-xml. itype:meta Issues about process/similar stat:duplicate
Projects
None yet
Development

No branches or pull requests

3 participants