scalafxml icon indicating copy to clipboard operation
scalafxml copied to clipboard

Scala 3 support?

Open jpsacha opened this issue 4 years ago • 6 comments

Any chance that ScalaFXML can support Scala 3? Is it even feasible given that Scala 3 has no macro annotations?

jpsacha avatar Apr 07 '21 21:04 jpsacha

In its current form I don't think it is possible, but I will think about it, maybe there is a different way with the new macros to make working with fxml convenient.

vigoo avatar Apr 08 '21 06:04 vigoo

I think it is fine to change approach to work smooth with new macros or other Scala 3 features. I hope to have ScalaFX building with Scala 3 soon, if that helps.

jpsacha avatar Apr 09 '21 00:04 jpsacha

I think right now the best possibility is to

  • reimplement the annotation macro itself as an sbt plugin with scalameta so it generates controllers for all fxmls in a source set/ones that are explicitly listed/find them in the resources source set
  • somehow support the existing features in this setup too, in a Scala3 compatible way (dependencies, nested, etc)

vigoo avatar Apr 12 '21 17:04 vigoo

The macro can remain a Scala 2-specific feature for now to not break projects not interested in upgrading to Scala 3.

vigoo avatar Apr 12 '21 17:04 vigoo

Any update an Scala 3 support?

jpsacha avatar May 18 '21 14:05 jpsacha

Sorry I was a bit busy, I'm trying to get some time this week to make a first release of this!

vigoo avatar May 20 '21 07:05 vigoo