Path to Scala 3
See original GitHub issueThis is an issue for discussing and tracking necessary step to prepare for a Dotty/Scala3 cross-build.
Inspired by the awesome “Scala Love” conference, I attempted to cross-build util-core
with Dotty 0.23.0-RC1
. So far it went smoother than expected. In the end there were about 4 compile-errors that I couldn’t directly address.
In any case there’s some work that has to be done before a real cross-build can be achieved. So far I’ve identified the following but I will try and update this list as we learn more.
Preparations:
- Update sbt to recent version (e.g.
1.3.10
; needed bysbt-dotty
) - Update Scalatest to
3.1.1
(which is cross-published for Dotty) - Update twitter/util to Scalatest version available for latest Dotty (Dependency on Twitter codebase) | @mosesn
- Remove deprecated Config code | @mosesn
- Wait for Dotty to fix
varargs
override issue (see https://github.com/lampepfl/dotty/issues/9463) - Wait for Scalatest 3.2.0 to be published for Dotty version which includes the
varargs
fix - Refactor code which is not supported in Scala 3 (e.g. usage of
Manifest
/TypeTag
reflection)
Resources for Dotty migration/cross-building:
- https://github.com/scalacenter/scala-3-migration-guide
- https://github.com/lampepfl/dotty-example-project#getting-your-project-to-compile-with-dotty
I hope you don’t mind this type of issue. This is not meant to push anyone, just as a place to discuss and organize things.
Cheers ~ Felix
Issue Analytics
- State:
- Created 3 years ago
- Reactions:2
- Comments:41 (38 by maintainers)
Top Results From Across the Web
Classpath Level | Scala 3 Migration Guide
This section describes the compatibility between Scala 2.13 and Scala 3 class files.
Read more >Scala 3: Path-Dependent Types, Type Projections, Dependent ...
This quick tutorial will show you what dependent types are and how they work in Scala 3, along with dependent methods and functions....
Read more >Scala 3
The fastest way to create a new project in Scala 3 is using sbt (1.1.4+). Create a Scala 3 project: sbt new lampepfl/dotty.g8....
Read more >The road to Scala 3 using scala3-migrate - YouTube
In the sixth video in the “Let's talk about Scala 3 ” series, Meriam Lachkar, a Software Engineer at the Scala Center, shows...
Read more >Scala 3: dealing with path dependent types - Stack Overflow
This is correct behavior for path-dependent types (by the way, in Scala 2 it's the same). Would you be satisfied with
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
I’ve opened PRs #288 and #289 as preparation steps for a real Scala 3.0.0 cross-build. 🙂
FYI: Scalatest has support for all Scala 3 releases so far:
https://mvnrepository.com/artifact/org.scalatest/scalatest
Just thought it might be good to know 🙂