Open marcesquerra opened 3 years ago
It may not be trivial, but any help is appreciated!
What I would do:
Let me know if you get stuck or need help on any of the steps.
I started looking into this and I got it to the point where I can at least compile & run a hello world https://github.com/cocreature/rules_scala/tree/scala-3. The next big missing piece is probably the dependency analyzer. I’m also largely ignoring backwards compatibility for now since I first want to get it to work before I worry about that too much. The compiler API is completely different so some parts will just consist of duplicating the code. Happy to share the work, the time I can spend on this atm is relatively limited.
@cocreature would you be still interested contributing your work? I experimented on your changes, you can see how to make them Scala 2.x compatible: https://github.com/liucijus/rules_scala/tree/scala3-in-progress
Unfortunately I got stuck trying to port the custom scala code for the unused deps & similar to Scala 3 so while it worked for a hello world, I couldn’t actually get it to work on our full project. I don’t expect keeping compatbiility with Scala 2 at the end will be the challenging part.
I don’t have the time at the moment to debug this further so if someone else wants to pick it up, by all means go for it. If not, I expect I’ll eventually get back to it but no idea about timelines.
@cocreature I'm planning to work on Scala 3 support, and got it working to some extent based on your changes though I had to do some modifications to select code based on Scala version. I thought it would be great to get you attributed for your initial development (ScalaWorker, Scala 3 deps, etc). Of course I can just start from scratch and open PR myself as I did in my fork. But it's up to you to decide. The only requirement is to make the Scala 2 compatible, Scala 3 code can be untested, I will take over from there. Let me know what you think.
Appreciate it but I’m perfectly happy to not be acknowledged here so just go ahead and open a PR yourself.
Reopening as it was closed unintentionally
I'd be glad to help with this issue. I just opened #1408 for an issue I was facing with Scala3.
Now that scala 3 is officially live, how difficult would it be to add support for it in bazel?
If it's just a matter of adding a custom toolchain, a bit of documentation would help (I tried to do it in a sample project but couldn't manage)
UPDATE: I initially said I could give a shot on trying to move this forward, but I have to back down. Both the scope of this and the demands of real life ended up being bigger than I thought. But still, support for Scala 3 would still be great!