Skip to content

Commit 7fbb451

Browse files
felixmuldersmarter
authored andcommitted
Update documentation for new sbt commands
1 parent b2143a1 commit 7fbb451

File tree

4 files changed

+63
-21
lines changed

4 files changed

+63
-21
lines changed

docs/css/main.scss

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -207,7 +207,7 @@ ul.post-list {
207207
}
208208
}
209209

210-
pre, code {
210+
pre, code, code.hljs {
211211
padding: 0;
212212
border: 0;
213213
border-radius: 3px;
@@ -221,6 +221,11 @@ code {
221221
padding-right: 0.1em;
222222
}
223223

224+
pre {
225+
padding: 0.5em;
226+
background-color: $grey !important;
227+
}
228+
224229
body {
225230
font: 400 16px/1.5 "Helvetica Neue", Helvetica, Arial, sans-serif;
226231
color: $text-color;

docs/docs/contributing/getting-started.md

Lines changed: 35 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -19,21 +19,48 @@ Requirements
1919
Make sure that you are using Java 8 or later, the output of `java -version`
2020
should contain `1.8`.
2121

22-
Compiling and running code
23-
--------------------------
22+
Compiling and Running
23+
---------------------
24+
Start by cloning the repository:
25+
26+
```none
27+
$ git clone https://github.com/lampepfl/dotty.git
28+
$ cd dotty
29+
```
30+
31+
Dotty provides a standard sbt build: compiling, running and starting a repl can
32+
all be done from within sbt using
33+
34+
```none
35+
$ sbt
36+
> dotc tests/pos/HelloWorld.scala
37+
> dotr HelloWorld
38+
hello world
39+
```
40+
41+
there is also a bash script that can be used in the same way:
42+
2443
```bash
25-
git clone https://github.com/lampepfl/dotty.git
26-
cd dotty
27-
# Clone dotty-compatible stdlib. Needed for running the test suite.
28-
git clone -b dotty-library https://github.com/DarkDimius/scala.git scala-scala
2944
# Compile code using Dotty
3045
./bin/dotc tests/pos/HelloWorld.scala
3146
# Run it with the proper classpath
3247
./bin/dotr HelloWorld
3348
```
3449

50+
3551
Starting a REPL
3652
---------------
37-
```bash
38-
./bin/dotr
53+
```none
54+
$ sbt
55+
> repl
56+
Welcome to Scala.next (pre-alpha) (Java HotSpot(TM) 64-Bit Server VM, Java 1.8.0_101).
57+
Type in expressions to have them evaluated.
58+
Type :help for more information.
59+
scala>
60+
```
61+
62+
or via bash:
63+
64+
```none
65+
$ ./bin/dotr
3966
```

docs/docs/contributing/workflow.md

Lines changed: 20 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -5,17 +5,27 @@ title: "Workflow"
55

66
This document details common workflow patterns when working with Dotty.
77

8+
## Cloning and building ##
9+
10+
```bash
11+
# Start by cloning the repository:
12+
git clone https://github.com/lampepfl/dotty.git
13+
cd dotty
14+
# Clone dotty-compatible stdlib. Needed for running the test suite.
15+
git clone -b dotty-library https://github.com/DarkDimius/scala.git scala-scala
16+
```
17+
818
## Compiling files with dotc ##
919

1020
From sbt:
1121

12-
```bash
13-
> run <OPTIONS> <FILE>
22+
```none
23+
> dotc <OPTIONS> <FILE>
1424
```
1525

1626
From terminal:
1727

18-
```bash
28+
```none
1929
$ ./bin/dotc <OPTIONS> <FILE>
2030
```
2131

@@ -37,29 +47,29 @@ Additional logging information can be obtained by changes some `noPrinter` to
3747

3848
## Running tests ##
3949

40-
```bash
50+
```none
4151
$ sbt
4252
> partest --show-diff --verbose
4353
```
4454

4555
## Running single tests ##
4656
To test a specific test tests/x/y.scala (for example tests/pos/t210.scala):
4757

48-
```bash
58+
```none
4959
> partest-only-no-bootstrap --show-diff --verbose tests/partest-generated/x/y.scala
5060
```
5161

52-
Currently this will re-run some tests and do some preprocessing because of the
53-
way partest has been set up.
62+
Currently this will re-run some unit tests and do some preprocessing because of
63+
the way partest has been set up.
5464

5565
## Inspecting Trees with Type Stealer ##
5666

5767
There is no power mode for the REPL yet, but you can inspect types with the
5868
type stealer:
5969

60-
```bash
61-
$ ./bin/dotr
62-
scala> import test.DottyTypeStealer._; import dotty.tools.dotc.core._; import Contexts._,Types._
70+
```none
71+
> repl
72+
scala> import dotty.tools.DottyTypeStealer._; import dotty.tools.dotc.core._; import Contexts._,Types._
6373
```
6474

6575
Now, you can define types and access their representation. For example:

docs/docs/index.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -11,8 +11,8 @@ Index
1111
-----
1212
* Usage
1313
- [Migrating from Scala 2](usage/migrating.md)
14-
- [Using Dotty with cbt](usage/cbt-projects.md)
15-
- [Using Dotty with sbt](usage/sbt-projects.md)
14+
- [Dotty projects with cbt](usage/cbt-projects.md)
15+
- [Dotty projects with sbt](usage/sbt-projects.md)
1616
* Contributing
1717
- [Getting Started](contributing/getting-started.md) details on how to run
1818
tests, use the cli scripts

0 commit comments

Comments
 (0)