Skip to content

Commit d1235d4

Browse files
Replace dotr -> scala and dotd -> scalad in the docs
Replace dotc -> scalac in the docs
1 parent d982469 commit d1235d4

17 files changed

+67
-67
lines changed

docs/_includes/getting-started.html

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,9 +8,9 @@ <h1 id="getting-started">Try Dotty</h1>
88
<p>If you are a Linux or Windows user, download the <a href="https://github.com/lampepfl/dotty/releases">latest release</a>. Optionally add path of the folder <code>bin/</code> to the system environment variable <code>PATH</code>. </p>
99

1010
<p>Now you can compile Scala source code:</p>
11-
<pre><code>dotc hello.scala</code></pre>
11+
<pre><code>scalac hello.scala</code></pre>
1212

13-
<p>To start the REPL, run: <code>dotr</code>.</p>
13+
<p>To start the REPL, run: <code>scala</code>.</p>
1414

1515
<p>Or, you can try Dotty in your browser with <a href="https://scastie.scala-lang.org/?target=dotty">Scastie</a>.</p>
1616

docs/docs/contributing/debug-tests.md

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -15,13 +15,13 @@ Both are usually pre-installed on macOS and linux distributions.
1515
First, compile the file `tests/debug/while.scala`:
1616

1717
```shell
18-
$ dotc tests/debug/while.scala
18+
$ scalac tests/debug/while.scala
1919
```
2020

2121
Second, run the compiled class with debugging enabled (suppose the main class is `Test`):
2222

2323
```shell
24-
$ dotr -d Test
24+
$ scala -d Test
2525
```
2626

2727
Third, start JDB:
@@ -83,13 +83,13 @@ compiler/test/debug/Gen tests/debug/while.scala > robot
8383
First, compile the file `tests/debug/while.scala`:
8484

8585
```shell
86-
$ dotc tests/debug/while.scala
86+
$ scalac tests/debug/while.scala
8787
```
8888

8989
Second, run the compiled class with debugging enabled:
9090

9191
```shell
92-
$ dotr -d Test
92+
$ scala -d Test
9393
```
9494

9595
Finally, run the expect script:

docs/docs/contributing/debugging.md

Lines changed: 12 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@ object Playground {
3232
}
3333
```
3434

35-
Then, you can debug Dotty by compiling this file via `dotc ../issues/Playground.scala` (from the SBT console) and collecting various debug output in process. This section documents techniques you can use to collect the debug info.
35+
Then, you can debug Dotty by compiling this file via `scalac ../issues/Playground.scala` (from the SBT console) and collecting various debug output in process. This section documents techniques you can use to collect the debug info.
3636

3737
[This](https://github.com/lampepfl/dotty/blob/10526a7d0aa8910729b6036ee51942e05b71abf6/compiler/src/dotty/tools/dotc/typer/Typer.scala#L2231) is the entry point to the Typer. The job of the Typer is to take an untyped tree, compute its type and turn it into a typed tree by attaching the type information to that tree. We will use this entry point to practice debugging techniques. E.g.:
3838

@@ -46,7 +46,7 @@ Then, you can debug Dotty by compiling this file via `dotc ../issues/Playground.
4646
Then:
4747

4848
```shell
49-
dotc ../issues/Playground.scala
49+
scalac ../issues/Playground.scala
5050
```
5151

5252
The techniques discussed below can be tried out in place of `println("Hello Debug")` in that location. They are of course applicable throughout the codebase.
@@ -70,9 +70,9 @@ if (tree.show == """println("Hello World")""")
7070

7171
The intention above is to output an extended debug info on a tree that matches a particular human-readable representation. However, because of the color characters, the comparison will fail.
7272

73-
To disable color output from `show`, run `dotc` as follows:
73+
To disable color output from `show`, run `scalac` as follows:
7474

75-
`dotc -color:never ../issues/Playground.scala`
75+
`scalac -color:never ../issues/Playground.scala`
7676

7777
## Reporting as a non-intrusive println
7878
Consider you want to debug the `tree` that goes into `assertPositioned(tree)` in the `typed` method. You can do:
@@ -94,19 +94,19 @@ assertPositioned(tree.reporting(s"Tree is: $result"))
9494
To print out the trees you are compiling after the FrontEnd (scanner, parser, namer, typer) phases:
9595

9696
```shell
97-
dotc -Xprint:typer ../issues/Playground.scala
97+
scalac -Xprint:typer ../issues/Playground.scala
9898
```
9999

100100
To print out the trees after Frontend and CollectSuperCalls phases:
101101

102102
```shell
103-
dotc -Xprint:typer,collectSuperCalls ../issues/Playground.scala
103+
scalac -Xprint:typer,collectSuperCalls ../issues/Playground.scala
104104
```
105105

106106
To print out the trees after all phases:
107107

108108
```shell
109-
dotc -Xprint:all ../issues/Playground.scala
109+
scalac -Xprint:all ../issues/Playground.scala
110110
```
111111

112112
To find out the list of all the phases and their names, check out [this](https://github.com/lampepfl/dotty/blob/10526a7d0aa8910729b6036ee51942e05b71abf6/compiler/src/dotty/tools/dotc/Compiler.scala#L34) line in `Compiler.scala`. Each `Phase` object has `phaseName` defined on it, this is the phase name.
@@ -119,7 +119,7 @@ object Foo
119119
object Foo
120120
```
121121

122-
Clearly we cannot define an object `Foo` twice. Now compile it as follows: `dotc -Ydebug-error ../issues/Playground.scala` (use whatever path you saved it under). The result will be as follows:
122+
Clearly we cannot define an object `Foo` twice. Now compile it as follows: `scalac -Ydebug-error ../issues/Playground.scala` (use whatever path you saved it under). The result will be as follows:
123123

124124
```scala
125125
-- Error: ../issues/Playground.scala:2:0 ---------------------------------------
@@ -173,7 +173,7 @@ val YprintPos: Setting[Boolean] = BooleanSetting("-Yprint-pos", "show tree posit
173173
And is to be used as:
174174

175175
```scala
176-
dotc -Yprint-pos ../issues/Playground.scala
176+
scalac -Yprint-pos ../issues/Playground.scala
177177
```
178178

179179
If used, all the trees output with `show` or via `-Xprint:typer` will also have positions attached to them, e.g.:
@@ -204,7 +204,7 @@ package <empty>@<Playground.scala:1> {
204204
Every [Positioned](https://github.com/lampepfl/dotty/blob/10526a7d0aa8910729b6036ee51942e05b71abf6/compiler/src/dotty/tools/dotc/ast/Positioned.scala) (a parent class of `Tree`) object has a `uniqueId` field. It is an integer that is unique for that tree and doesn't change from compile run to compile run. You can output these IDs from any printer (such as the ones used by `.show` and `-Xprint`) via `-Yshow-tree-ids` flag, e.g.:
205205

206206
```shell
207-
dotc -Xprint:typer -Yshow-tree-ids ../issues/Playground.scala
207+
scalac -Xprint:typer -Yshow-tree-ids ../issues/Playground.scala
208208
```
209209

210210
Gives:
@@ -229,7 +229,7 @@ package <empty>#1047 {
229229
You can then use these IDs to locate the creation site of a given tree using that ID via `-Ydebug-tree-with-id`, e.g.:
230230

231231
```shell
232-
dotc -Ydebug-tree-with-id 1049 ../issues/Playground.scala
232+
scalac -Ydebug-tree-with-id 1049 ../issues/Playground.scala
233233
```
234234

235235
When the tree with the correspond id is allocated, the following prompt will appear:
@@ -363,4 +363,4 @@ trace.force(i"typing $tree", typr, show = true) { // ...
363363
```
364364

365365
### Reporter
366-
Defined in [Reporter.scala](https://github.com/lampepfl/dotty/blob/10526a7d0aa8910729b6036ee51942e05b71abf6/compiler/src/dotty/tools/dotc/reporting/Reporter.scala). Enables calls such as `report.log`. To enable, run dotc with `-Ylog:typer` option.
366+
Defined in [Reporter.scala](https://github.com/lampepfl/dotty/blob/10526a7d0aa8910729b6036ee51942e05b71abf6/compiler/src/dotty/tools/dotc/reporting/Reporter.scala). Enables calls such as `report.log`. To enable, run scalac with `-Ylog:typer` option.

docs/docs/contributing/getting-started.md

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -25,8 +25,8 @@ all be done from within sbt:
2525

2626
```bash
2727
$ sbt
28-
> dotc tests/pos/HelloWorld.scala
29-
> dotr HelloWorld
28+
> scalac tests/pos/HelloWorld.scala
29+
> scala HelloWorld
3030
hello world
3131
```
3232

@@ -41,10 +41,10 @@ and you will be able to run the corresponding commands directly from your consol
4141

4242
```shell
4343
# Compile code using Dotty
44-
$ dotc tests/pos/HelloWorld.scala
44+
$ scalac tests/pos/HelloWorld.scala
4545

4646
# Run it with the proper classpath
47-
$ dotr HelloWorld
47+
$ scala HelloWorld
4848
```
4949

5050

@@ -62,7 +62,7 @@ scala>
6262
or via bash:
6363

6464
```bash
65-
$ dotr
65+
$ scala
6666
```
6767

6868

docs/docs/contributing/testing.md

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -9,9 +9,9 @@ Running all tests in Dotty is as simple as:
99
$ sbt test
1010
```
1111

12-
Specifically, `sbt test` runs all tests that do _not_ require a bootstrapped
13-
compiler. In practice, this means that it runs all compilation tests meeting
14-
this criterion, as well as all non-compiler tests.
12+
Specifically, `sbt test` runs all tests that do _not_ require a bootstrapped
13+
compiler. In practice, this means that it runs all compilation tests meeting
14+
this criterion, as well as all non-compiler tests.
1515

1616
The entire suite of tests can be run using the bootstrapped compiler as follows:
1717

@@ -87,7 +87,7 @@ Test output dumped in: tests/playground/neg/Sample.check.out
8787
To create a checkfile for a test, you can do one of the following:
8888

8989
- Create a dummy checkfile with a random content, run the test, and, when it fails, use the `mv` command reported by the test to replace the dummy checkfile with the actual output.
90-
- Manually compile the file you are testing with `dotc` and copy-paste whatever console output the compiler produces to the checkfile.
90+
- Manually compile the file you are testing with `scalac` and copy-paste whatever console output the compiler produces to the checkfile.
9191

9292
## Integration tests
9393
These tests are Scala source files expected to compile with Dotty (pos tests),

docs/docs/contributing/workflow.md

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -6,19 +6,19 @@ title: Workflow
66
Check [Getting Started](getting-started.md) for instructions on how to obtain the source code of dotty.
77
This document details common workflow patterns when working with Dotty.
88

9-
## Compiling files with dotc ##
9+
## Compiling files with scalac ##
1010

1111
As we have seen you can compile a test file either from sbt:
1212

1313
```bash
1414
$ sbt
15-
> dotc <OPTIONS> <FILE>
15+
> scalac <OPTIONS> <FILE>
1616
```
1717

1818
or from terminal:
1919

2020
```bash
21-
$ dotc <OPTIONS> <FILE>
21+
$ scalac <OPTIONS> <FILE>
2222
```
2323

2424
Here are some useful debugging `<OPTIONS>`:
@@ -60,7 +60,7 @@ u: dotty.tools.dotc.core.Types.Type = TypeBounds(TypeRef(ThisType(TypeRef(NoPref
6060
```
6161

6262
## Pretty-printing ##
63-
Many objects in the dotc compiler implement a `Showable` trait (e.g. `Tree`,
63+
Many objects in the scalac compiler implement a `Showable` trait (e.g. `Tree`,
6464
`Symbol`, `Type`). These objects may be prettyprinted using the `.show`
6565
method
6666

@@ -70,8 +70,8 @@ The basics of working with Dotty codebase are documented [here](https://dotty.ep
7070

7171
| Command | Description |
7272
|------------------------------------------------------|-------------------------------------------------------------------------------------------------------------------------------|
73-
| `dotc ../issues/Playground.scala` | Compile the given file – path relative to the Dotty directory. Output the compiled class files to the Dotty directory itself. |
74-
| `dotr Playground` | Run the compiled class `Playground`. Dotty directory is on classpath by default. |
73+
| `scalac ../issues/Playground.scala` | Compile the given file – path relative to the Dotty directory. Output the compiled class files to the Dotty directory itself. |
74+
| `scala Playground` | Run the compiled class `Playground`. Dotty directory is on classpath by default. |
7575
| `repl` | Start REPL |
7676
| `testOnly dotty.tools.dotc.CompilationTests -- *pos` | Run test (method) `pos` from `CompilationTests` suite. |
7777
| `testCompilation sample` | In all test suites, run test files containing the word `sample` in their title. |

docs/docs/internals/core-data-structures.md

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ by tne
1919
A symbol refers to a definition in a source program. Traditionally,
2020
compilers store context-dependent data in a _symbol table_. The
2121
symbol then is the central reference to address context-dependent
22-
data. But for `dotc`'s requirements it turns out that symbols are
22+
data. But for `scalac`'s requirements it turns out that symbols are
2323
both too little and too much for this task.
2424

2525
Too little: The attributes of a symbol depend on the phase. Examples:
@@ -32,23 +32,23 @@ a trait). So a functional compiler, a `Symbol` by itself met mean
3232
much. Instead we are more interested in the attributes of a symbol at
3333
a given phase.
3434

35-
`dotc` has a concept for "attributes of a symbol at
35+
`scalac` has a concept for "attributes of a symbol at
3636

3737
Too much: If a symbol is used to refer to a definition in another
3838
compilation unit, we get problems for incremental recompilation. The
3939
unit containing the symbol might be changed and recompiled, which
4040
might mean that the definition referred to by the symbol is deleted or
4141
changed. This leads to the problem of stale symbols that refer to
42-
definitions that no longer exist in this form. `scalac` tried to
42+
definitions that no longer exist in this form. Scala 2 compiler tried to
4343
address this problem by _rebinding_ symbols appearing in certain cross
4444
module references, but it turned out to be too difficult to do this
45-
reliably for all kinds of references. `dotc` attacks the problem at
45+
reliably for all kinds of references. Scala 3 compiler attacks the problem at
4646
the root instead. The fundamental problem is that symbols are too
4747
specific to serve as a cross-module reference in a system with
4848
incremental compilation. They refer to a particular definition, but
4949
that definition may not persist unchanged after an edit.
5050

51-
`dotc` uses instead a different approach: A cross module reference is
51+
`scalac` uses instead a different approach: A cross module reference is
5252
always type, either a `TermRef` or ` TypeRef`. A reference type contains
5353
a prefix type and a name. The definition the type refers to is established
5454
dynamically based on these fields.

docs/docs/internals/dotc-scalac.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -44,14 +44,14 @@ only be applied if an implicit `Context` is in scope.
4444

4545
### Symbol ###
4646
* `Symbol` instances have a `SymDenotation`
47-
* Most symbol properties in scalac are now in the denotation (in dotc)
47+
* Most symbol properties in the Scala 2 compiler are now in the denotation (in the Scala 3 compiler).
4848

4949
Most of the `isFooBar` properties in scalac don't exist anymore in dotc. Use
5050
flag tests instead, for example:
5151

5252
```scala
53-
if (sym.isPackageClass) // scalac
54-
if (sym is Flags.PackageClass) // dotc (*)
53+
if (sym.isPackageClass) // Scala 2
54+
if (sym is Flags.PackageClass) // Scala 3 (*)
5555
```
5656

5757
`(*)` Symbols are implicitly converted to their denotation, see above. Each

docs/docs/internals/overall-structure.md

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ classes, [Compiler] and [Run].
2020

2121
Package Structure
2222
-----------------
23-
Most functionality of `dotc` is implemented in subpackages of `dotc`. Here's a
23+
Most functionality of `scalac` is implemented in subpackages of `dotc`. Here's a
2424
list of sub-packages and their focus.
2525

2626
```
@@ -44,10 +44,10 @@ list of sub-packages and their focus.
4444

4545
Contexts
4646
--------
47-
`dotc` has almost no global state (the only significant bit of global state is
47+
`scalac` has almost no global state (the only significant bit of global state is
4848
the name table, which is used to hash strings into unique names). Instead, all
4949
essential bits of information that can vary over a compiler run are collected
50-
in a [Context]. Most methods in `dotc` take a `Context` value as an implicit
50+
in a [Context]. Most methods in `scalac` take a `Context` value as an implicit
5151
parameter.
5252

5353
Contexts give a convenient way to customize values in some part of the
@@ -88,7 +88,7 @@ a problem.
8888

8989
Compiler Phases
9090
---------------
91-
Seen from a temporal perspective, the `dotc` compiler consists of a list of
91+
Seen from a temporal perspective, the `scalac` compiler consists of a list of
9292
phases. The current list of phases is specified in class [Compiler] as follows:
9393

9494
```scala

docs/docs/internals/periods.md

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -3,14 +3,14 @@ layout: doc-page
33
title: "Dotc's concept of time"
44
---
55

6-
Conceptually, the `dotc` compiler's job is to maintain views of various
6+
Conceptually, the `scalac` compiler's job is to maintain views of various
77
artifacts associated with source code at all points in time. But what is
8-
*time* for `dotc`? In fact, it is a combination of compiler runs and compiler
8+
*time* for `scalac`? In fact, it is a combination of compiler runs and compiler
99
phases.
1010

1111
The *hours* of the compiler's clocks are measured in compiler [runs]. Every run
1212
creates a new hour, which follows all the compiler runs (hours) that happened
13-
before. `dotc` is designed to be used as an incremental compiler that can
13+
before. `scalac` is designed to be used as an incremental compiler that can
1414
support incremental builds, as well as interactions in an IDE and a REPL. This
1515
means that new runs can occur quite frequently. At the extreme, every
1616
keystroke in an editor or REPL can potentially launch a new compiler run, so
@@ -32,7 +32,7 @@ lower-level JVM view. There are different ways to deal with this. Many
3232
compilers change the type of a symbol destructively according to the "current
3333
phase". Another, more functional approach might be to have different symbols
3434
representing the same definition at different phases, which each symbol
35-
carrying a different immutable type. `dotc` employs yet another scheme, which
35+
carrying a different immutable type. `scalac` employs yet another scheme, which
3636
is inspired by functional reactive programming (FRP): Symbols carry not a
3737
single type, but a function from compiler phase to type. So the type of a
3838
symbol is a time-indexed function, where time ranges over compiler phases.

docs/docs/reference/changed-features/compiler-plugins.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -25,10 +25,10 @@ _standard plugins_ in Dotty. In terms of features, they are similar to
2525

2626
## Using Compiler Plugins
2727

28-
Both standard and research plugins can be used with `dotc` by adding the `-Xplugin:` option:
28+
Both standard and research plugins can be used with `scalac` by adding the `-Xplugin:` option:
2929

3030
```shell
31-
dotc -Xplugin:pluginA.jar -Xplugin:pluginB.jar Test.scala
31+
scalac -Xplugin:pluginA.jar -Xplugin:pluginB.jar Test.scala
3232
```
3333

3434
The compiler will examine the jar provided, and look for a property file named

docs/docs/reference/features-classification.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -197,6 +197,6 @@ The new type-checking and inference algorithms are the essential core of the new
197197

198198
Some existing programs will break and, given the complex nature of type inference, it will not always be clear what change caused the breakage and how to fix it.
199199

200-
In our experience, macros and changes in type and implicit argument inference together cause the large majority of problems encountered when porting existing code to Scala 3. The latter source of problems could be addressed systematically by a tool that added all inferred types and implicit arguments to a Scala 2 source code file. Most likely such a tool would be implemented as a Scala 2 compiler plugin. The resulting code would have a greatly increased likelihood to compile under Scala 3, but would often be bulky to the point of being unreadable. A second part of the rewriting tool should then selectively and iteratively remove type and implicit annotations that were synthesized by the first part as long as they compile under Scala 3. This second part could be implemented as a program that invokes the Scala 3 compiler `dotc` programmatically.
200+
In our experience, macros and changes in type and implicit argument inference together cause the large majority of problems encountered when porting existing code to Scala 3. The latter source of problems could be addressed systematically by a tool that added all inferred types and implicit arguments to a Scala 2 source code file. Most likely such a tool would be implemented as a Scala 2 compiler plugin. The resulting code would have a greatly increased likelihood to compile under Scala 3, but would often be bulky to the point of being unreadable. A second part of the rewriting tool should then selectively and iteratively remove type and implicit annotations that were synthesized by the first part as long as they compile under Scala 3. This second part could be implemented as a program that invokes the Scala 3 compiler `scalac` programmatically.
201201

202202
Several people have proposed such a tool for some time now. I believe it is time we find the will and the resources to actually implement it.

docs/docs/reference/metaprogramming/macros-spec.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ In addition, an identifier `$x` starting with a `$` that appears inside
2121
a quoted expression or type is treated as a splice `${x}` and a quoted identifier
2222
`'x` that appears inside a splice is treated as a quote `'{x}`
2323

24-
### Implementation in `dotc`
24+
### Implementation in `scalac`
2525

2626
Quotes and splices are primitive forms in the generated abstract syntax trees.
2727
Top-level splices are eliminated during macro expansion while typing. On the

0 commit comments

Comments
 (0)