kitlangton / formula

Form Combinator Library for decimating frontend boilerplate.
https://formula.surge.sh
Apache License 2.0
37 stars 17 forks source link

support for Scala 3? #5

Open axb21 opened 2 years ago

axb21 commented 2 years ago

I guess this is more of a question than an issue, but I was wondering if you have any plans to port this lovely library to Scala 3. Thanks!

axb21 commented 2 years ago

Oops, I probably should have noted that this works (for me) in a scala 3 project to make sbt stop complaining:

        ("io.github.kitlangton" %%% "formula" % "0.1.0").cross(CrossVersion.for3Use2_13) excludeAll(
          ExclusionRule(organization="org.scala-js",name="scalajs-dom"),
          ExclusionRule(organization="app.tulz",name="tuplez-full-light"),
          ExclusionRule(organization="com.raquo")
        )

However that does not end the problems because formula is using Scala 2 macros and my scala-fu is not powerful enough to tell if there's a workaround. Even so, my understanding is that this CrossVersion stuff is meant to ease migration, and not meant as a long-term solution. Hence the question/issue!

kitlangton commented 1 year ago

I'd totally be open to this, yet I don't have time at the moment to implement it myself. The macro magic is all done via Software Mill's Magnolia library, which makes it relatively easy to implement macros in Scala 3 and 2. Certainly better than if it had to be done by hand :D

axb21 commented 1 year ago

Time, yes, who among us has any of that anymore? I cloned this code so that I could leave it open and poke at it now and then, but so far I have not been able to get the project compiling with scala 3. I never did dig into how Magnolia works, so for now I'm groping and hacking. I should probably read the documentation.