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

Scala3 #734

Closed
wants to merge 6 commits into from
Closed

Scala3 #734

wants to merge 6 commits into from

Conversation

LarsWestergren
Copy link
Contributor

@LarsWestergren LarsWestergren commented Aug 31, 2022

Some compiler warnings, should I fix those too?

Fixes #684

@LarsWestergren
Copy link
Contributor Author

Dependent on #735

@LarsWestergren LarsWestergren force-pushed the scala3 branch 4 times, most recently from 03ea3d8 to 4f0d181 Compare September 3, 2022 12:49
@ErikSchierboom
Copy link
Member

Just so you know: I'm back :) So let me know if you need me to test anything.

@LarsWestergren
Copy link
Contributor Author

Just so you know: I'm back :) So let me know if you need me to test anything.

New project (Golang!) started today so a bit hectic at work now, but in a week or two I hope to pick this up again. Currently stuck on "testgen" which is a bigger task, I get a macro compile error from the Play JSON libs after upgrading to the Scala 3 versions (not officially released yet, at Milestone) and looking into why.

@ErikSchierboom
Copy link
Member

Sure, no rush!

@samuelsayag
Copy link

Hello guys,
Just a few comments and questions and first a thanks to @LarsWestergren :)

scala 2

  • There are still a lot of code bases out there that lean on scala 2. If you place yourself in the shoes of people that come from say Java and enter a Scala project they could have to understand a huge quantity of scala 2 code.
  • scala 2.13 is still highly supported (the community build feature a forever supported)

Is it wise to replace the current scala2 track by a scala3 one?
Would it be complicated to create another parallel track for scala3?

thanks!!

@ErikSchierboom
Copy link
Member

Is it wise to replace the current scala2 track by a scala3 one?

You could argue the same thing for Python 2 vs Python 3 🤷 It will be a fact that there are a lot of code bases out there that use Scala 2, but that will hold for any new version of a language, as adoption will take time. That does not mean that we shouldn't upgrade. In general, we always like to keep our tracks on the latest version, as it'll offer the latest features and usually the documentation of the language will also refer to the latest version, making it easier for students to find things.

There are also guides available to migrate form v2 to v3, like https://scalacenter.github.io/scala-3-migration-guide/docs/external-resources/moving-from-scala-2-to-scala-3.html

Would it be complicated to create another parallel track for scala3?

It is not an option, as we'll only have one track per language. Sorry.

@JonathanReeve
Copy link

How's this going? Scala 3 has been out for a while now, and all the beginner books I see on Scala use Scala 3. Sticking with Scala 2, then, seems unusual. I'm a Scala beginner, but is there some way I could help?

@LarsWestergren
Copy link
Contributor Author

How's this going? Scala 3 has been out for a while now, and all the beginner books I see on Scala use Scala 3. Sticking with Scala 2, then, seems unusual. I'm a Scala beginner, but is there some way I could help?

Had a light case of burnout, getting better but still taking it easy on weekends and holidays. I hope to start up again soon, but in the meantime, feel free to fork and continue the work if you want to. As you can see the exercises part should be done (unless more exercises have appeared since), I stopped at the "testgen" subproject. The upgraded Play libraries should hopefully be released now so I'll check if it compiles with Scala 3 or if code changes need to be done.

@ErikSchierboom
Copy link
Member

Sorry to hear about the burnout @LarsWestergren! Definitely take it easy. There is no rush getting this merged.

@NatiAris
Copy link

Are you sure about replacing the existing track?
Scala 2 and Scala 3 are more dissimilar than Python 2 and Python 3 were.
Most of Scala code in existence is Scala 2 and will stay so for quite a while, so having a place to practice Scala 2 is actually quite beneficial, as most job postings are still Scala 2 as well.
Many things that were the way to go in Scala 2 wouldn't be in Scala 3 (e.g. implicits are still supported but not actually intended to be used in new code, rather only facilitating 2 to 3 migration).
Plus, with a separate track it would be possible to migrate problems one-by-one, rather than doing it in a single enormous undertaking.
I don't know how many steps creation of a separate track involves, though.

@ErikSchierboom
Copy link
Member

We'll give it some thought. Thanks for your feedback

@Sam647254
Copy link

Just wondering if this is still being worked on? It's been a few months since the last update, and Scala 3.3.0 is now the latest version; if others are not available to continue the migration, then I can (try to) pick it up as well.

@ErikSchierboom
Copy link
Member

Just wondering if this is still being worked on? It's been a few months since the last update, and Scala 3.3.0 is now the latest version; if others are not available to continue the migration, then I can (try to) pick it up as well.

It looks like there hasn't been any progress, so I think you can safely work on it!

@LarsWestergren
Copy link
Contributor Author

Just wondering if this is still being worked on? It's been a few months since the last update, and Scala 3.3.0 is now the latest version; if others are not available to continue the migration, then I can (try to) pick it up as well.

Please do! I keep hoping I can start working on it again, but i keep being busy with work stuff so it would be fantastic if someone takes over and finishes it.

@apetresc
Copy link

apetresc commented Sep 7, 2023

Out of curiosity, is there a way for users to sponsor/bounty a specific initiative, like this one?

@ErikSchierboom
Copy link
Member

ErikSchierboom commented Sep 7, 2023

Not really, no.

edit: well, you can sponsor us at https://exercism.org/insiders, but that's more of an indirect way :)

@asarkar
Copy link

asarkar commented Dec 21, 2023

@LarsWestergren What are the steps one should follow if they want to pick up and finish this PR? And, roughly how much time should they expect to set aside for this task?
Knowing the answer to these questions will help me decide if I can contribute.

@LarsWestergren
Copy link
Contributor Author

@LarsWestergren What are the steps one should follow if they want to pick up and finish this PR? And, roughly how much time should they expect to set aside for this task? Knowing the answer to these questions will help me decide if I can contribute.

I was done with all the exercises I think. I don't think anyone has added new exercises to the Scala track since, but not sure. From what I recall, fixing the "testgen" directory sbt targets is what remains. When I was working on it, play-json (and maybe twirl-api?) had not been updated to work with Scala 3. I think they relied on macros which changed a lot in Scala 3. If the libraries have been upgraded now, there may just be a day or twos work left hopefully? If the libraries have not been ported, replacing the functionality with other libraries might be a bigger job. Difficult for me to estimate how long that would take, especially for someone else to do it. But maybe expect to set aside a couple of days or even a week for it?

For the exercises, I had done just the bare minimum to make it compile. There probably lots that can be done to make the solutions much more idiomatic and elegant Scala 3. But that is something that can be addressed in small PRs from multiple contributors once the move to Scala 3 has been merged.

@ErikSchierboom
Copy link
Member

But that is something that can be addressed in small PRs from multiple contributors once the move to Scala 3 has been merged.

Absolutely.

@ErikSchierboom
Copy link
Member

@LarsWestergren Let me know when I can review

@grzegorz-bielski grzegorz-bielski mentioned this pull request Jul 18, 2024
3 tasks
@ErikSchierboom
Copy link
Member

We now have Scala 3 support thanks to #836

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

How to update to scala 2.13 or 3?
8 participants