-
-
Notifications
You must be signed in to change notification settings - Fork 247
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
Support for Scala 3 #631
Comments
I added 2 action items. The first one can be done in Scala 2 while the second one requires exploring new territories. |
@ghostdogpr, I would like to start with the first one. I will migrate the Parser from fastparse to cats-parse. |
@lvitaly awesome! Let me know if you have any question! |
Super helpful article on typeclass derivation with Scala 3: https://blog.philipp-martini.de/blog/magic-mirror-scala3/ |
I was experimenting with type class derivation in Scala 3 last week, and I think there is no support for annotations. We need that for deriving the schema, don't we? Maybe it's necessary to use Macros to achieve the same behavior |
Yeah I guess that part requires a macro. It would be nice if https://github.com/propensive/adversaria supported Scala 3. By the way by this small change to the link I posted, we can achieve auto derivation without the |
Opened a PR with preliminary work: #847 If someone want to contribute, porting the small |
@ghostdogpr I could try to port the |
Planning to do a first release this week! |
There are currently 2 blockers caused by usage of macros in dependencies:
fastparse
which heavily relies on macros and needs a rewrite. There are some efforts at porting Li Haoyi stack https://contributors.scala-lang.org/t/porting-ammonite-to-dotty/4469/11 but nothing on fastparse yet. An alternative would be using recently released cats-parse that already publishes for dottymagnolia
which is also using macros. There are also some ongoing works WIP: Scala 3 support softwaremill/magnolia#249 but nothing usable yet. An alternative would be using dotty native typeclass derivation features to derive the schema without magnolia.Possible action items:
Schema
using Scala 3 typeclass derivation. Relevant code in Caliban is https://github.com/ghostdogpr/caliban/blob/master/core/src/main/scala/caliban/schema/Schema.scala#L366. This can be done step by step, first focusing ontoType()
and converting the Scala type to a GraphQL type.The text was updated successfully, but these errors were encountered: