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

Cross-publish for Scala 3 #3891

Closed
4 of 8 tasks
jrudolph opened this issue Aug 2, 2021 · 7 comments
Closed
4 of 8 tasks

Cross-publish for Scala 3 #3891

jrudolph opened this issue Aug 2, 2021 · 7 comments
Labels
1 - triaged Tickets that are safe to pick up for contributing in terms of likeliness of being accepted t:build Issues that affect the build t:core Issues related to the akka-http-core module
Milestone

Comments

@jrudolph
Copy link
Member

jrudolph commented Aug 2, 2021

We thought we could rely on Scala 2.13 compatibility for a while. Even though this works well for applications, it turned out that it isn't a viable solution for libraries that depend on Akka HTTP (see e.g. scala-js/scala-js-dom#451).

Unfortunately, we are pretty stuck on parboiled2 Scala 3 support.

Our options:

  • Port parboiled2 to Scala 3 (or at least help in porting), see Publish for Dotty sirthias/parboiled2#210
  • Move away from parboiled2 to another parser engine like cats-parse
    • Needs testing that performance will be good enough
    • Requires rewriting all parsers (or somehow generating the parsers from what we have right now)
  • Implement a mini-parboiled2 without macros for Scala 3, losing performance but getting something ready soon.

In the meantime, we can:

  • Replace parsing with a stub for Scala 3
  • Try to get the rest of the code compiling with Scala 3 (most tests are likely to fail, parsing is too important).

Remaining steps:

@jrudolph jrudolph added 1 - triaged Tickets that are safe to pick up for contributing in terms of likeliness of being accepted t:build Issues that affect the build t:core Issues related to the akka-http-core module labels Aug 2, 2021
@armanbilge
Copy link
Contributor

Is there still interest in sharing a parser with http4s? http4s/http4s#4733

@jrudolph
Copy link
Member Author

I'm not opposed, but I think it might be more work than useful. The main problem seems to be that most of the parser usage is not the parsing itself but instantiating the model from the data. I don't see a good way for abstracting that away without either

  • creating either an intermediate representation (which we want to avoid for performance reasons)
  • or, adding some underlying trait-based base infrastructure (which would be a complex / binary incompatible change that we'd like to avoid for now for compatibility reasons)

We will probably have a serious attempt at getting parboiled2 up to speed first before reevaluating the other options, if necessary.

@armanbilge
Copy link
Contributor

or, adding some underlying trait-based base infrastructure

@jrudolph Are you referring to something like Jawn's Facade type class? Which lets it parse JSON to any AST. Not sure why this would be binary incompatible, couldn't this be hidden away from public APIs?

@armanbilge
Copy link
Contributor

What are your thoughts on this proposal? http4s/http4s#4745 (comment)

@SethTisue
Copy link
Contributor

Thrilled to see that parboiled2 now supports Scala 3.1: sirthias/parboiled2#280 (comment)

👏 @jrudolph

@liosedhel
Copy link

Hello :) now as parboiled2 is published for Scala 3 what are the next steps? This steps in ticket description seems to be outdated - e.g. spray and akka deps are also migrated now. How can one help here @jrudolph ? :)

@jrudolph
Copy link
Member Author

jrudolph commented Mar 7, 2022

There's still a crazy amount of work left, I've got a branch open of Scala 3 work at #4079 but it's currently quite unorganized. When I find time I'll try to clean it up so that it can be easier broken down into distinct steps to finish,

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
1 - triaged Tickets that are safe to pick up for contributing in terms of likeliness of being accepted t:build Issues that affect the build t:core Issues related to the akka-http-core module
Projects
None yet
Development

No branches or pull requests

5 participants