lightbend / genjavadoc

A compiler plugin for generating doc’able Java source from Scala source
Other
58 stars 32 forks source link

Support for Scala 3? #354

Open chitralverma opened 6 months ago

SethTisue commented 6 months ago

Great question.

genjavadoc was originally built for Akka, which is likely to remain cross-compiled for Scala 2 and 3 for a long time, so there isn't really a motivation for the original authors and maintainers to build a Scala 3 version — not in the short to medium term, anyway — because Akka can keep generating its Javadoc on the Scala 2 side.

Note that Scala 2 and Scala 3 are very different internally, so a Scala 3 implementation would probably be rather different. A Scala 3 implementation would probably be based on TASTy, which doesn't exist in Scala 2. And it wouldn't need to be a compiler plugin like this one is. So the good news is that having TASTy (and https://github.com/scalacenter/tasty-query) to build on could make the implementation simpler. The bad news is having to write a new implementation.

Some other good news is that this really isn't a big project at all. cloc says src/main has:

Scala                           11            150             75            947

which is just not that big. I expect a Scala 3 reimplementation would be of comparable size, or smaller. It would be a great project for somebody. The testing infrastructure and test cases in this repo already exist and would be reusable for this.

SethTisue commented 6 months ago

cc @sjrd who I assume remains interested in possible use cases for TASTy Query