This is Scala 2! Welcome! This is the home of the Scala 2 standard library, compiler, and language spec. For Scala 3, visit scala/scala3. How to contribute Issues and bug…
This is Scala 2! Welcome!
This is the home of the Scala 2
standard library, compiler, and language spec.
For Scala 3, visit scala/scala3.
How to contribute
Issues and bug reports for Scala 2 are located in scala/bug. That tracker is also where new contributors may find issues to work on: good first issues, help wanted.
For coordinating broader efforts, we also use the scala/scala-dev tracker.
To contribute here, please open a pull request from your fork of this repository.
If your change affects the standard library, see CONTRIBUTING.md for remarks about what sort of changes might be accepted in Scala 2 and/or Scala 3.
We require that you sign the Scala CLA before we can merge any of your work, to protect Scala's future as open source software.
The general workflow is as follows.
1. Find/file an issue in scala/bug (or submit a well-documented PR right away!).
2. Fork the scala/scala repo.
3. Push your changes to a branch in your forked repo. For coding guidelines, go here.
4. Submit a pull request to scala/scala from your forked repo.
For more information on building and developing the core of Scala, read the rest of this README, especially for setting up your machine!
Get in touch!
In order to get in touch with other Scala contributors, join the
\#scala-contributors channel on the Scala Discord chat, or post on
contributors.scala-lang.org (Discourse).
If you need some help with your PR at any time, please feel free to @-mention anyone from the list below, and we will do our best to help you out:
| | username | talk to me about... |
--------------------------------------------------------------------------------------------------|----------------------------------------------------------------|---------------------------------------------------|
| @lrytz | back end, optimizer, named & default arguments, reporters |
| @retronym | compiler performance, weird compiler bugs, lambdas |
| @SethTisue | getting started, build, CI, community build, Jenkins, docs, library, REPL |
| @dwijnand | pattern matcher, MiMa, partest |
| @som-snytt | warnings/lints/errors, REPL, compiler options, compiler internals, partest |
| @Ichoran | collections library, performance |
| @viktorklang | concurrency, futures |
| @sjrd | interactions with Scala.js |
| @bishabosha | TASTy reader |
| @joroKr21 | higher-kinded types, implicits, variance |
P.S.: If you have some spare time to help out around here, we would be delighted to add your name to this list!
Branches
Target the oldest branch you would like your changes to end up in. We periodically merge forward from 2.12.x to 2.13.x. Most changes should target 2.13.x, as 2.12.x is now under minimal maintenance.
If your change is difficult to merge forward, you may be asked to also submit a separate PR targeting the newer branch.
If your change is version-specific and shouldn't be merged forward, put [nomerge] in the PR name.
If your change is a backport from a newer branch and thus doesn't need to be merged forward, put [backport] in the PR name.
Choosing a branch
Most changes should target 2.13.x. We are increasingly reluctant to target 2.12.x unless there is a special reason (e.g. if an especially bad bug is found, or if there is commercial sponsorship). See Scala 2 maintenance.
Repository structure
Most importantly:
scala/
+--build.sbt The main sbt build definition
+--project/ The rest of the sbt build
+--src/ All sources
+---/library Scala Standard Library
+---/reflect Scala Reflection
+---/compiler Scala Compiler
+--test/ The Scala test suite
+---/files Partest tests
+---/junit JUnit tests
+---/scalacheck ScalaCheck tests
+--spec/ The Scala language specification
but also:
scala/
+---/library-aux Scala Auxiliary Library, for bootstrapping and documentation purposes
+---/interactive Scala Interactive Compiler, for clients such as an IDE (aka Presentation Compiler)
+---/manual Scala's runner scripts "man" (manual) pages
+---/partest Scala's internal parallel testing framework
+---/partest-javaagent Partest's helper java agent
+---/repl Scala REPL core
+---/repl-frontend Scala REPL frontend
+---/scaladoc Scala's documentation tool
+---/scalap Scala's class file decompiler
+---/testkit Scala's unit-testing kit
+--admin/ Scripts for the CI jobs and releasing
+--doc/ Additional licenses and copyrights
+--scripts/ Scripts for the CI jobs and releasing
+--tools/ Scripts useful for local development
+--build/ Build products
+--dist/ Build products
+--target/ Build products
Get ready to contribute
Requirements
You need the following tools:
- Java SDK. The baseline version is 8 for both 2.12.x and 2.13.x. It is almost always fine
to use a later SDK (such as 17 or 21) for local development. CI will verify against the
baseline version.
- sbt
MacOS and Linux work. Windows may work if you use Cygwin. Community help with keeping
the build working on Windows and documenting any needed setup is appreciated.
Tools we use
We are grateful for the following OSS licenses:
- JProfiler Java profiler
- YourKit Java Profiler
- IntelliJ IDEA
Build setup
Basics
During ordinary development, a new Scala build is built by the
previously released version, known as the "reference compiler" or,
slangily, as "STARR" (stable reference release). Building with STARR
is sufficient for most kinds of changes.
However, a full build of Scala is _bootstrapped_. Bootstrapping has
two steps: first, build with STARR; then, build again using the
freshly built compiler, leaving STARR behind. This guarantees that
every Scala version can build itself.
If you change the code generation part of the Scala compiler, your
changes will only show up in the bytecode of the library and compiler
after a bootstrap. Our CI does a bootstrapped build.
Bootstrapping locally: To perform a bootstrap, run restarrFull
within an sbt session. This will build and publish the Scala
distribution to your local artifact repository and then switch sbt to
use that version as its new scalaVersion. You may then revert back
with reload. Note restarrFull will also write the STARR version
to buildcharacter.properties so you can switch back to it withrestarr without republishing. This will switch the sbt session to
use the build-restarr and target-restarr directories instead ofbuild and target, which avoids wiping out classfiles and
incremental metadata. IntelliJ will continue to be configured to
compile and run tests using the starr version inversions.properties.
For history on how the current scheme was arrived at, see
https://groups.google.com/d/topic/scala-internals/gp5JsM1E0Fo/discussion.
Building with fatal warnings: To make warnings in the project fatal (i.e. turn them into errors), run set Global / fatalWarnings := true in sbt (replace Global with the name of a module—such as reflect—to only make warnings fatal for that module). To disable fatal warnings again, either reload sbt, or run set Global / fatalWarnings := false (again, replace Global with the name of a module if you only enabled fatal warnings for that module). CI always has fatal warnings enabled.
Using the sbt build
Once you've started an sbt session you can run one of the core commands:
- compile compiles all sub-projects (library, reflect, compiler, scaladoc, etc)
- scala / scalac run the REPL / compiler directly from sbt (accept options /
arguments)
- enableOptimizer reloads the build with the Scala optimizer enabled. Our releases are built this way. Enable this when working on compiler performance improvements. When the optimizer is enabled the build will be slower and incremental builds can be incorrect.
- setupPublishCore runs enableOptimizer and configures a version number based on the current Git SHA. Often used as part of bootstrapping: sbt setupPublishCore publishLocal && sbt -Dstarr.version= testAll
- dist/mkBin generates runner scripts (scala, scalac, etc) in build/quick/bin
- dist/mkPack creates a build in the Scala distribution format in build/pack
- junit/test runs the JUnit tests; junit/testOnly *Foo runs a subset
- scalacheck/test runs scalacheck tests, use testOnly to run a subset
- partest runs partest tests (accepts options, try partest --help)
- publishLocal publishes a distribution locally (can be used as scalaVersion in
other sbt projects)
- Optionally set baseVersionSuffix := "bin-abcd123-SNAPSHOT"
where abcd123 is the git hash of the revision being published. You can also
use something custom like "bin-mypatch". This changes the version number from
2.13.2-SNAPSHOT to something more stable (2.13.2-bin-abcd123-SNAPSHOT).
- Note that the -bin string marks the version binary compatible. Using it in
sbt will cause the scalaBinaryVersion to be 2.13. If the version is not
binary compatible, we recommend using -pre, e.g., 2.14.0-pre-abcd123-SNAPSHOT.
- Optionally set ThisBuild / Compile / packageDoc / publishArtifact := false
to skip generating / publishing API docs (speeds up the process).
If a command results in an error message like a module is not authorized to depend on, it may be that a global sbt plugin is causing
itself
a cyclical dependency. Try disabling global sbt plugins (perhaps by
temporarily commenting them out in ~/.sbt/1.0/plugins/plugins.sbt).
Sandbox
We recommend keeping local test files in the sandbox directory which is listed in
the .gitignore of the Scala repo.
IDE setup
In IntelliJ IDEA, use "File - Open...", select the project folder and use
"Open as: sbt project".
- JUnit tests can be launched / debugged from the IDE, including tests that
run the compiler (e.g., QuickfixTest).
- Building in IntelliJ interoperates with the sbt build; the compiler script in
build/quick/bin (generated by running sbt dist/mkBin) runs the classfiles
built via the IDE.
In VSCode / Metals, open the project directory and import the project as ususal.
Coding guidelines
Our guidelines for contributing are explained in [CONTRIBUTING.md](CONTRIBUTING.md).
It contains useful information on our coding standards, testing, documentation, how
we use git and GitHub and how to get your code reviewed.
Refer to our [LLM policy](LLM_POLICY.md) for rules and guidelines regarding the use
of LLM-based tools in your contributions.
You may also want to check out the following resources:
- The "Scala Hacker Guide"
covers some of the same ground as this README, but in greater detail and in a more
tutorial style, using a running example.
- Scala documentation site
Scala CI

Once you submit a PR your commits will be automatically tested by the Scala CI.
Our CI setup is always evolving. See
scala/scala-dev#751
for more details on how things currently work and how we expect they
might change.
If you see a spurious failure on Jenkins, you can post /rebuild as a PR comment.
The scabot README lists all available commands.
If you'd like to test your patch before having everything polished for review,
you can have Travis CI build your branch (make sure you have a fork and have Travis CI
enabled for branch builds on it first, and then push your branch). Also
feel free to submit a draft PR. In case your draft branch contains
a large number of commits (that you didn't clean up / squash yet for review),
consider adding [ci: last-only] to the PR title. That way only the last commit
will be tested, saving some energy and CI-resources. Note that inactive draft PRs
will be closed eventually, which does not mean the change is being rejected.
CI performs a compiler bootstrap. The first task, validatePublishCore, publishes
a build of your commit to the temporary repository
https://scala-ci.typesafe.com/artifactory/scala-pr-validation-snapshots.
Note that this build is not yet bootstrapped, its bytecode is built using the
current STARR. The version number is 2.13.2-bin-abcd123-SNAPSHOT where abcd123
is the commit hash. For binary incompatible builds, the version number is2.14.0-pre-abcd123-SNAPSHOT.
You can use Scala builds in the validation repository locally by adding a resolver
and specifying the corresponding scalaVersion:
$ sbt
> set resolvers += "pr" at "https://scala-ci.typesafe.com/artifactory/scala-pr-validation-snapshots/"
> set scalaVersion := "2.13.17-bin-abcd123-SNAPSHOT"
> console
"Nightly" builds
The Scala CI publishes these to
https://scala-ci.typesafe.com/artifactory/scala-integration/ .
Using a nightly build in sbt and other tools is explained on this
[doc page](https://docs.scala-lang.org/overviews
…
Members
-
scala3 ★ PINNED
The Scala 3 compiler, also known as Dotty.
Scala ★ 6.3k 12h agoExplain → -
scala ★ PINNED
Scala 2 compiler and standard library. Scala 2 bugs at https://github.com/scala/bug; Scala 3 at https://github.com/scala/scala3
Scala ★ 15k 1d agoExplain → -
scala-lang ★ PINNED
sources for the Scala language website
SCSS ★ 299 3d agoExplain → -
docs.scala-lang ★ PINNED
The Scala Documentation website
HTML ★ 574 8d agoExplain → -
bug ★ PINNED
Scala 2 bug reports only. Please, no questions — proper bug reports only.
★ 235 2y agoExplain → -
scala.epfl.ch ★ PINNED
web site for the Scala Center @ EPFL in Switzerland
SCSS ★ 39 1mo agoExplain → -
scala-async
An asynchronous programming facility for Scala
Scala ★ 1.2k 6d agoExplain → -
pickling ▣
Fast, customizable, boilerplate-free pickling support for Scala
Scala ★ 829 9y agoExplain → -
scala-parser-combinators
simple combinator-based parsing for Scala. formerly part of the Scala standard library, now a separate community-maintained module
Scala ★ 677 6d agoExplain → -
scala-java8-compat
A Java 8 (and up) compatibility kit for Scala.
Scala ★ 437 6d agoExplain → -
legacy-svn-scala ▣
OBSOLETE, we're over there:
Scala ★ 366 12y agoExplain → -
scala3-example-project
An example sbt project that compiles using Dotty
Scala ★ 335 5d agoExplain → -
scala-xml
The standard Scala XML library
Scala ★ 316 6d agoExplain → -
scala-dist
sbt project that packages the Scala 2 distribution
Scala ★ 269 5mo agoExplain → -
scala-abide ▣
obsolete; visit https://github.com/scalacenter/scalafix instead
Scala ★ 227 8y agoExplain → -
scala-parallel-collections
Parallel collections standard library module for Scala 2.13+
Scala ★ 219 6d agoExplain → -
scala-collection-compat
makes some Scala 2.13 APIs (primarily collections, also some others) available on 2.11 and 2.12, to aid cross-building
Scala ★ 210 6d agoExplain → -
collection-strawman ▣
Implementation of the new Scala 2.13 Collections
Scala ★ 198 7y agoExplain → -
scala3.g8
No description.
Scala ★ 156 6d agoExplain → -
scala-seed.g8
Giter8 template for a simple hello world app in Scala.
Scala ★ 155 12h agoExplain → -
community-build
Scala 2 community build — a corpus of open-source repos built against Scala nightlies
Scala ★ 141 5d agoExplain → -
scala-swing
Scala wrappers for Java's Swing API for desktop GUIs
Scala ★ 141 6d agoExplain → -
scala-dev
Scala 2 team issues. Not for user-facing bugs or directly actionable user-facing improvements. For build/test/infra and for longer-term planning and idea tracking. Our bug tracker is at https://github.com/scala/bug/issues
★ 128 3mo agoExplain → -
scala-collection-contrib
community-contributed additions to the Scala 2.13 collections
Scala ★ 111 6d agoExplain → -
toolkit
The batteries-included Scala
Scala ★ 95 2mo agoExplain → -
scala-module-dependency-sample ▣
Depend on Scala modules like a pro
Scala ★ 94 7y agoExplain → -
scala-continuations ▣
the Scala delimited continuations plugin and library
Scala ★ 92 6y agoExplain → -
make-release-notes
The project that generates Scala release notes.
HTML ★ 82 6d agoExplain → -
vscode-scala-syntax
Visual Studio Code extension for syntax highlighting Scala sources
Scala ★ 78 9d agoExplain → -
scala-library-next
backwards-binary-compatible Scala standard library additions
Scala ★ 70 6d agoExplain → -
compiler-benchmark
Benchmarks for scalac
Scala ★ 68 8mo agoExplain → -
slip ▣
obsolete — archival use only
★ 66 9y agoExplain → -
improvement-proposals
Scala Improvement Proposals
★ 62 4mo agoExplain → -
scala-tool-support ▣
No description.
XML ★ 34 9y agoExplain → -
hello-world.g8
No description.
Scala ★ 28 18h agoExplain → -
scala-collection-laws
partially-automatic generation of tests for the entire collections library
Scala ★ 23 6d agoExplain → -
scala3-mill-example-project
No description.
Shell ★ 18 15d agoExplain → -
scala3-cross.g8
No description.
Scala ★ 17 6d agoExplain → -
scala-jenkins-infra
A Chef cookbook that manages Scala's CI infrastructure.
Shell ★ 15 7mo agoExplain → -
scabot
Scala 2's PR&CI automation bot
Scala ★ 15 1y agoExplain → -
scala-asm
A fork of https://gitlab.ow2.org/asm/asm for the Scala compiler
★ 15 7mo agoExplain → -
sbt-scala-module
sbt plugin for scala modules.
Scala ★ 13 6d agoExplain → -
scalatest-example.g8
No description.
Scala ★ 12 6d agoExplain → -
scala3-staging.g8
No description.
Scala ★ 10 18h agoExplain → -
compiler-interface ▣
a binary contract between Zinc and Scala Compilers
Scala ★ 10 4y agoExplain → -
scala-partest ▣
Legacy repo for testing framework for Scala versions <= 2.12
Scala ★ 9 3y agoExplain → -
scala-asm-legacy ▣
A fork of asm.ow2.org for the Scala compiler
Java ★ 8 8y agoExplain → -
jenkins-scripts ⑂ ▣
Scripts used by eponymous jenkins jobs at http://scala-webapps.epfl.ch/jenkins/
Shell ★ 5 11y agoExplain → -
scala3-lts ⑂
This repository houses branches for the Scala 3 LTS, main repository is under scala/scala3.
Scala ★ 4 4d agoExplain → -
scala-jline ⑂ ▣
The new Jline
Java ★ 4 11y agoExplain → -
cla-checker
Checks if the author has signed the Scala CLA
★ 4 11mo agoExplain → -
scala3-tasty-inspector.g8
No description.
Scala ★ 2 6d agoExplain → -
scala-dist-smoketest
Smoke Test for newly created Scala distributions
Shell ★ 2 6d agoExplain → -
dotty.epfl.ch
The nightly documentation of scala 3
HTML ★ 1 10mo agoExplain → -
actors-migration ▣
No description.
Scala ★ 1 12y agoExplain → -
scala-library-all ▣
Conglomerate pom file to pull in components of Scala standard library easily.
Scala ★ 1 13y agoExplain → -
scala-partest-interface ▣
SBT interface to partest
★ 1 10y agoExplain → -
.github
No description.
★ 0 2y agoExplain → -
scala-modules-build ▣
Build support for the various Scala Modules
Shell ★ 0 12y agoExplain → -
graphviz-deb ▣
No description.
★ 0 8y agoExplain → -
gha-test ▣
No description.
★ 0 5y agoExplain → -
compiler-benchq
No description.
Scala ★ 0 5y agoExplain →
No repos match these filters.