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
Start cross-compiling pureconfig-core to Scala 3.0.0-M2 #891
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for doing this, I'm excited to start supporting Scala 3.0! Apart from one comment regarding failWithType
the code changes look good to me, but I think we need to simplify the build.
Regarding |
14b7b54
to
48a8671
Compare
48a8671
to
31a7782
Compare
modules/magnolia/src/test/scala/pureconfig/module/magnolia/CoproductHintSuite.scala
Outdated
Show resolved
Hide resolved
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks @jcazevedo!
Depends on #890.
This PR starts cross-compiling pureconfig-core to Scala 3.0.0-M2.
This makes the
Derivation
macro a no-op in Scala 3. I'm not sure we should implement it with Scala 3 macros, since errors in implicit chains are much better now, pointing the user to the most specific implicit argument that was missing in the implicit search. I'm actually inclined to drop it entirely, since theDerivation
type leaks into PureConfig's external API, the macro is hard to maintain and we can recommend users in Scala 2 to use splain for better implicit not found errors. @leifwickland and @ruippeixotog: If you agree with this, I'll open a separate PR to remove theDerivation
type and update the documentation to provide a guide to using splain for debugging implicit not found errors.My plan is to follow-up with the necessary updates to support generic derivation of
ConfigReader
andConfigWriter
instances in another PR, hopefully still during this week. I think we should be able to support this directly in pureconfig-core using the type class derivation features of Scala 3 (and taking advantage of thederives
machinery). We probably still want to keep pureconfig-generic for compatibility purposes and to provide the configuration mechanisms for derivation we currently support with hints.