Skip to content

Fix broken link in the navigation of docs and add minor adjustments #2436

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 2 commits into from
May 16, 2017
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion docs/docs/contributing/backend.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ title: Working with the Backend
The compiler backend is based on a fork of the Scala 2.11 `GenBCode` backend and
lives at

> https://github.com/lampepfl/scala/tree/sharing-backend.
> https://github.com/lampepfl/scala/tree/sharing-backend

The dotty source tree contains a git submodule in the directory
[scala-backend](https://github.com/lampepfl/dotty/tree/master/scala-backend)
Expand Down
8 changes: 4 additions & 4 deletions docs/docs/contributing/debug-tests.md
Original file line number Diff line number Diff line change
Expand Up @@ -21,13 +21,13 @@ $ dotc tests/debug/while.scala
Second, run the compiled class with debugging enabled (suppose the main class is `Test`):

```shell
dotr -d Test
$ dotr -d Test
```

Third, start JDB:

```
jdb -attach 5005 -sourcepath tests/debug/
$ jdb -attach 5005 -sourcepath tests/debug/
```

You can run `help` for commands that supported by JDB.
Expand Down Expand Up @@ -83,13 +83,13 @@ compiler/test/debug/Gen tests/debug/while.scala > robot
First, compile the file `tests/debug/while.scala`:

```
bin/dotc tests/debug/while.scala
$ dotc tests/debug/while.scala
```

Second, run the compiled class with debugging enabled:

```
bin/dotr -d Test
$ dotr -d Test
```

Finally, run the expect script:
Expand Down
5 changes: 3 additions & 2 deletions docs/docs/contributing/eclipse.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ title: Building Dotty with Eclipse
Setup
-----------

You can setup Eclipse by using _[Scala IDE for Eclipse](http://scala-ide.org/)_ directly to run Dotty. Alternatively you can download
You can setup Eclipse by using [Scala IDE for Eclipse](http://scala-ide.org/) to run Dotty. Alternatively you can download
your Eclipse distribution of choice and enable the Scala IDE from the Eclipse Marketplace, separately.

1. Clone Dotty's repository from Github (and run `sbt managedSources` as described in
Expand Down Expand Up @@ -57,4 +57,5 @@ Additionally you need to specify the scala-asm library as an external jar depend

![](../../images/eclipse/eclipse-runconfiguration.png "Import Dotty Projects")

The compiler can be run and debugged using the same configuration. To contribute to dotty please follow the [Dotty Developer Guidelines](https://github.com/lampepfl/dotty/blob/master/CONTRIBUTING.md).
The compiler can be run and debugged using the same configuration.

6 changes: 6 additions & 0 deletions docs/docs/contributing/getting-started.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,8 @@ layout: doc-page
title: Getting Started
---



Requirements
------------
Make sure that you are using Java 8 or later. The output of `java -version`
Expand Down Expand Up @@ -62,3 +64,7 @@ or via bash:
```bash
$ dotr
```

Before contributing to Dotty, we invite you to consult the
[Dotty Developer Guidelines](https://github.com/lampepfl/dotty/blob/master/CONTRIBUTING.md).

4 changes: 1 addition & 3 deletions docs/docs/contributing/intellij-idea.md
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ For the first option you can fire up sbt from the `Terminal` window of IDEA or y
For example, to run a test you can write with or without flags:

```shell
dotc tests/pos/Arrays.scala
$ dotc tests/pos/Arrays.scala
```

If you are interested in debugging the compiler you can enable the necessary agent on the JVM.
Expand All @@ -57,5 +57,3 @@ Now every time you run `dotc` you can set your breakpoints and hit the `Debug do
the sample configuration above). The default data on the configuration match the enabled agent on the VM so, probably,
you will not need to change anything else.

To contribute to dotty please follow the [Dotty Developer Guidelines](https://github.com/lampepfl/dotty/blob/master/CONTRIBUTING.md).

16 changes: 7 additions & 9 deletions docs/docs/contributing/workflow.md
Original file line number Diff line number Diff line change
Expand Up @@ -19,24 +19,24 @@ $ sbt
or from terminal:

```bash
$ ./bin/dotc <OPTIONS> <FILE>
$ dotc <OPTIONS> <FILE>
```

Here are some useful debugging `<OPTIONS>`:

* `-Xprint:PHASE1,PHASE2,...` or `-Xprint:all`: prints the `AST` after each
specified phase. Phase names can be found by searching
`compiler/src/dotty/tools/dotc/transform/` for `phaseName`.
specified phase. Phase names can be found by examining the
`dotty.tools.dotc.transform.*` classes for their `phaseName` field e.g., `-Xprint:erasure`.
You can discover all phases in the `dotty.tools.dotc.Compiler` class
* `-Ylog:PHASE1,PHASE2,...` or `-Ylog:all`: enables `ctx.log("")` logging for
the specified phase.
* `-Ycheck:all` verifies the consistency of `AST` nodes between phases, in
particular checks that types do not change. Some phases currently can't be
`Ycheck`ed, therefore in the tests we run:
`-Ycheck:tailrec,resolveSuper,mixin,restoreScopes,labelDef`.

More powerful logging capabilities can be enabled by changing some `noPrinter` to
`new Printer` in `compiler/src/dotty/tools/dotc/config/Printers.scala`. This enables the
`subtyping.println("")` and `ctx.traceIndented("", subtyping)` style logging.
* the last frontier of debugging (before actual debugging) is the range of logging capabilities that
can be enabled through the `dotty.tools.dotc.config.Printers` object. Change any of the desired printer from `noPrinter` to
`default` and this will give you the full logging capability of the compiler.

## Inspecting Trees with Type Stealer ##

Expand Down Expand Up @@ -64,5 +64,3 @@ u: dotty.tools.dotc.core.Types.Type = TypeBounds(TypeRef(ThisType(TypeRef(NoPref
Many objects in the dotc compiler implement a `Showable` trait (e.g. `Tree`,
`Symbol`, `Type`). These objects may be prettyprinted using the `.show`
method

To contribute to dotty please follow the [Dotty Developer Guidelines](https://github.com/lampepfl/dotty/blob/master/CONTRIBUTING.md).
2 changes: 1 addition & 1 deletion docs/sidebar.yml
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ sidebar:
- title: Testing
url: docs/contributing/testing.html
- title: Working with the Backend
url: docs/contributing/backend.md
url: docs/contributing/backend.html
- title: Internals
subsection:
- title: Backend
Expand Down