Yet Another Scala 3 Migration Story
Briefly

The migration of SwissBorg's codebase to Scala 3 involved over 170,000 lines of code across four services and a library, completed in just two weeks. Key improvements included automatic handling through migration flags, the application of sbt-tpolecat for compiler flags, and newly identified issues like redundant patterns and stricter access controls. Encapsulated logic relying on Shapeless was easily updated, leading to enhanced code readability. Overall, the migration showcased the manageable complexity of Scala 3 integration, promoting cleaner coding practices and improved type handling.
We ran into quirks around chained package clauses and default-imported symbols. This made us standardize on flat package declarations - which turned out much simpler overall.
We discovered a single compiler bug triggered by complex types used in extension methods. Workaround was trivial.
Coproducts - Migrated cleanly to Scala 3 union types. The code became much more readable.
Compile-time numbers (s and )- These could be reimplemented in Scala 3, but we realized we didn't need them and just removed the usages.
Read at Medium
[
|
]