alonsodomin / cron4s

Cross-platform CRON expression parsing for Scala
https://alonsodomin.github.io/cron4s
Apache License 2.0
121 stars 24 forks source link

Scala 3 Support? #468

Closed patryk-celinski closed 9 months ago

patryk-celinski commented 1 year ago

Are there any plans to update cron4s for Scala 3?

I see that shapeless is used in 10 files and there are some plugins like macro paradise and kind projector that I'm not sure how to assess their influence. Albeit macro paradise uses partialVersion so this is probably not a problem. Shapeless is the main blocker and the fact that it is not needed in Scala 3 and supposedly was replaced by language-level features.

i10416 commented 1 year ago

plan for Scala 3 migration

extra&idea

alonsodomin commented 1 year ago

There are several things in the library that need a clean up but it would be better to address after the Scala 3 support is released. I believe it's better to allow users to keep using the same features with latest Scala as that would allow for a smoother transition.

Among the things I would like to clean up is in fact the Scala 2 support. This is a very simple library whose primary functionality is quite stable and most users are happy with it. So once a path towards Scala 3 is given, removing Scala 2 would allow to also remove a lot of warts or convoluted code.

Other changes that I would like to address would be:

Happy to hear about other proposals. In way, I like the idea of keeping the library simple as hell, just being a glorified parser of CRON expressions and a calculator for future dates with a very simple user experience that way other projects can build more advanced systems around it.

mbaechler commented 10 months ago

Hi, I would be quite interested in a release of cron4s with scala 3 support. If there are things to fix, I can offer some help. Let me know. Cheers,

alonsodomin commented 10 months ago

hi @mbaechler, to be fair, everything should be more or less ready, the code in main is already compatible with Scala 3 the only remaining bit is publishing it.

We have an attempt some time ago that failed and live got in the way and I didn't have much time to look into it: https://github.com/alonsodomin/cron4s/actions/runs/5462541330/job/14789162567

I'll try to trigger the build once again so I can see what the problem is and get the published version through the line.

mbaechler commented 10 months ago

Hi @alonsodomin , thank you for your answer, i can't find your new try at publishing the artifacts, if you run it, I can probably have a look at the logs.

Cheers,

alonsodomin commented 10 months ago

Hi @mbaechler just made a general upgrade of the dependencies and gave it another go. The build is failing at the stage in which it generates the Scala docs for Scala 3. You can see the run here:

https://github.com/alonsodomin/cron4s/actions/runs/7366389197

Seems similar to the following issue, although somewhat unrelated... https://github.com/lampepfl/dotty/issues/14143

mbaechler commented 9 months ago

Hi @alonsodomin

I think I nailed the issue here : https://github.com/alonsodomin/cron4s/pull/552

Could you have a look?

alonsodomin commented 9 months ago

thanks a lot @mbaechler

alonsodomin commented 9 months ago

cron4s with support for Scala 3 has been published with version 0.7.0