Skip to content

Commit 31c1900

Browse files
committed
Update documentation for new sbt commands
1 parent 4bd5c5e commit 31c1900

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
@@ -160,14 +160,19 @@ ul.post-list {
160160
}
161161
}
162162

163-
pre, code {
163+
pre, code, code.hljs {
164164
padding: 0;
165165
border: 0;
166166
border-radius: 3px;
167167
background-color: $grey;
168168
font-family: $code-font-family;
169169
}
170170

171+
pre {
172+
padding: 0.5em;
173+
background-color: $grey !important;
174+
}
175+
171176
body {
172177
font: 400 16px/1.5 "Helvetica Neue", Helvetica, Arial, sans-serif;
173178
color: #111;

docs/docs/contributing/getting-started.md

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

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

53+
3854
Starting a REPL
3955
---------------
40-
```bash
41-
./bin/dotr
56+
```none
57+
$ sbt
58+
> repl
59+
Welcome to Scala.next (pre-alpha) (Java HotSpot(TM) 64-Bit Server VM, Java 1.8.0_101).
60+
Type in expressions to have them evaluated.
61+
Type :help for more information.
62+
scala>
63+
```
64+
65+
or via bash:
66+
67+
```none
68+
$ ./bin/dotr
4269
```

docs/docs/contributing/workflow.md

Lines changed: 20 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -7,17 +7,27 @@ Workflow
77
========
88
This document details common workflow patterns when working with Dotty.
99

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

1222
From sbt:
1323

14-
```bash
15-
> run <OPTIONS> <FILE>
24+
```none
25+
> dotc <OPTIONS> <FILE>
1626
```
1727

1828
From terminal:
1929

20-
```bash
30+
```none
2131
$ ./bin/dotc <OPTIONS> <FILE>
2232
```
2333

@@ -39,29 +49,29 @@ Additional logging information can be obtained by changes some `noPrinter` to
3949

4050
## Running tests ##
4151

42-
```bash
52+
```none
4353
$ sbt
4454
> partest --show-diff --verbose
4555
```
4656

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

50-
```bash
60+
```none
5161
> partest-only-no-bootstrap --show-diff --verbose tests/partest-generated/x/y.scala
5262
```
5363

54-
Currently this will re-run some tests and do some preprocessing because of the
55-
way partest has been set up.
64+
Currently this will re-run some unit tests and do some preprocessing because of
65+
the way partest has been set up.
5666

5767
## Inspecting Trees with Type Stealer ##
5868

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

62-
```bash
63-
$ ./bin/dotr
64-
scala> import test.DottyTypeStealer._; import dotty.tools.dotc.core._; import Contexts._,Types._
72+
```none
73+
> repl
74+
scala> import dotty.tools.DottyTypeStealer._; import dotty.tools.dotc.core._; import Contexts._,Types._
6575
```
6676

6777
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
@@ -13,8 +13,8 @@ Index
1313
-----
1414
* Usage
1515
- [Migrating from Scala 2](usage/migrating.md)
16-
- [Using Dotty with cbt](usage/cbt-projects.md)
17-
- [Using Dotty with sbt](usage/sbt-projects.md)
16+
- [Dotty projects with cbt](usage/cbt-projects.md)
17+
- [Dotty projects with sbt](usage/sbt-projects.md)
1818
* Contributing
1919
- [Getting Started](contributing/getting-started.md) details on how to run
2020
tests, use the cli scripts

0 commit comments

Comments
 (0)