Skip to content
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

Rewrite with scalafix? #27

Open
alexarchambault opened this issue May 29, 2020 · 3 comments
Open

Rewrite with scalafix? #27

alexarchambault opened this issue May 29, 2020 · 3 comments

Comments

@alexarchambault
Copy link
Owner

Like simulacrum, data-class relies on macro annotations, that are going away in dotty / scala 3. simulacrum was rewritten as a set of scalafix rules for dotty. We should probably consider doing something along those lines here at some point.

@hamnis
Copy link

hamnis commented Apr 5, 2022

An attempt of doing this can be seen here: https://github.com/hamnis/dataclass-scalafix

@adpi2
Copy link

adpi2 commented May 24, 2023

What about the new Scala 3 macro annotations? Do we know if they are powerful enough for this library?

@alexarchambault
Copy link
Owner Author

@adpi2 I think they should, with some adaptations (from what I recall, it doesn't allow to add things to the companion object of an annotated class, but new being optional means tweaking constructors is enough, and the unapply isn't needed anymore in Scala 3 IIRC). But using them needs to be allowed from stable Scala 3 versions (maybe 3.3.0 will allow that?).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants