This guide is intended to give new contributors the knowledge they need to
become productive and fix issues or implement new features in Scala 3. It
also documents the inner workings of the Scala 3 compiler,
A Note on Stability
Keep in mind that the code for
dotc is subject to change, with no
guarantees of stability, so the ideas discussed in this guide may
fall out of date, please consider contributing to this guide
Get the Most from This Guide
dotc is built with Scala 3, fully utilising its new features.
It is recommended that you first have some familiarity with Scala 3
to get the most out of this guide. You can learn more in the language reference.
Many code snippets in this guide make use of shell commands (a line beginning with
$), and in this case
bash compatible shell is assumed. You may have to look up how to translate commands to your shell.
What is a Compiler?
A compiler is a program that takes as input text, representing a program in one language and produces as output the same program, written in another programming language.
The Scala Compiler
As an example,
dotc takes text input, verifies that it is a valid Scala program
and then produces as output the same program, but written in Java bytecode, and optionally
in SJSIR when producing Scala.js output.
Contributors to this page:
- About This Guide
- Getting Started
- Contributing to Scala 3
- Reproducing an Issue
- Finding the Cause of an Issue
- Common Issue Locations
- How to Inspect Values
- Improving Your Workflow
- Testing Your Changes
- Pull Request Checklist
- High Level Architecture
- Compiler Overview
- Compiler Phases
- Compiler Types
- Time in the Compiler