Contact
Contact

How to be a part of Scala’s Open Community Build

Picture of Wojciech Mazur, Tooling Software Developer

Wojciech Mazur

Tooling Software Developer

23 minutes read

console

import scala.collection.SeqOps
 
extension[A, CC[B] <: SeqOps[B, CC, CC[B]]](seq: CC[A])
 def isRotationOf(that: CC[A]): Boolean = ???
 
@main def Test =
  Seq('A','B','C', 'D') isRotationOf "DAB" // ok
  ("ABCD": Seq[Char])   isRotationOf "DAB" // ok (1)
  wrapString("ABCD")    isRotationOf "DAB" // ok (2)
  "ABCD"                isRotationOf "DAB" // error, no such method (3)

console

someSetting := 
   if(scalaVersion.value == “3.1.3”) someValue
   else if (scalaVersion.value == Scala3) someOtherValue
   else defaultValue 

console

 someSetting := CrossVersion.partialVersion(scalaVersion.value) match {
    case Some((3, 2)) => someScala3Value
    case Some((2, 13)) => someScala2Value
 }

console

 someSetting := CrossVersion.partialVersion(scalaVersion.value) match {
    case Some((3, 1)) => someVerySpecificScala31Value
    case Some((3, _)) => someScala3Value
    case Some((2, _)) => someScala2Value
 }

console

someSetting := 
  if (scalaVersion.value.startsWith(“3.1.”)) someVerySpecificScala31Value
  else if (scalaVersion.value.startsWith(“3.”)) someScala3Value
  else defaultScala2Value 

console

tests = compile-only  // default for the project
projects.overrides {
  subModuleA.tests = full  // compile and execute tests in project named `subModuleA`
  benchmarks { tests = disabled } // ignore tests in project name `benchmarks`
} 

console

mill.options = ["-J-Xss2M"]
sbt.options = [ “-Dproject.in.ci=true”, “-J-Xmx5G”]

console

sbt.commands = [
   “genAdditionalSources”,
   "set every Test/classLoaderLayeringStrategy := ClassLoaderLayeringStrategy.Flat",
   """set Test/unmanagedSources/excludeFilter ~= { _ || “FailingTest.scala" }"""
]

console

  uses-compiler-plugins = true

bash

scala-cli \ 
  https://raw.githubusercontent.com/VirtusLab/community-build3/master/cli/scb-cli.scala – \ 
  run virtuslab/avocado 3.2.1-RC1
Scala 3 Support and Migration

Curated by

Sebastian Synowiec

Liked the article?

Share it with others!

explore more on

Partner flexibly with VirtusLab

Use one or a combination of engagement models to suit your needs.

See what our clients are saying

The VirtusLab team's in-depth knowledge, understanding, and experience of technology have been invaluable to us in developing our product. The team is professional and delivers on time – we greatly appreciated this efficiency when working with them.

Michael GrantDirector of Development @ Cyber Sec Company

VirtusLab's work has met the mark several times over, and their latest project is no exception. The team is efficient, hard-working, and trustworthy. Customers can expect a proactive team that drives results.

Stephen RookeDirector of Software Development @ Extreme Reach

VirtusLab's engineers are truly Strapi extensions experts. Their knowledge and expertise in the area of Strapi plugins gave us the opportunity to lift our multi-brand CMS implementation to a different level.

Leonardo PoddaEngineering Manager @ Facile.it

VirtusLab has been an incredible partner since the early development of Scala 3, essential to a mature and stable Scala 3 ecosystem.

Martin OderskyHead of Programming Research Group @ EPFL

VirtusLab engineers provided excellent workmanship coupled with very fast delivery ahead of our ambitious schedule. Their knowledge, expertise, and guidance made us feel comfortable and confident with our choices. We knew the work was going to be completed on time and with “no fuss”. 

Nate MyersSenior Partnership Manager @ imgix, Inc.

VirtusLab consultancy services are what we were looking for to ensure our ideas and technology directions were valid. The work and knowledge provided by them significantly shorten the go-to-market time we expect for the next generation of our software.

Darryl GraumanDirector of R&D @ The Clinician