@@ -4,8 +4,11 @@ title: Working with the Backend
4
4
---
5
5
6
6
The compiler backend is based on a fork of the Scala 2.11 ` GenBCode ` backend and
7
- lives at https://github.com/lampepfl/scala/tree/sharing-backend . The dotty
8
- source tree contains a git submodule in the directory
7
+ lives at
8
+
9
+ > https://github.com/lampepfl/scala/tree/sharing-backend .
10
+
11
+ The dotty source tree contains a git submodule in the directory
9
12
[ scala-backend] ( https://github.com/lampepfl/dotty/tree/master/scala-backend )
10
13
that points to this fork. We do not compile every file in this submodule,
11
14
instead we add the subset of files we need to the dotty-compiler project in the
@@ -16,39 +19,44 @@ their content is not automatically updated when you do `git checkout` or `git
16
19
pull`, instead everytime you switch branch, you need to do:
17
20
18
21
``` shell
19
- git submodule update --init
22
+ $ git submodule update --init
20
23
```
21
24
22
25
## Environment setup
23
26
24
- 1 . Set the following git configuration options to make working with submodules
25
- easier, see the [ Git Book] ( https://git-scm.com/book/en/v2/Git-Tools-Submodules )
27
+ 1 . Set the following git configuration options to make working with submodules easier,
28
+ see the [ Git Book] ( https://git-scm.com/book/en/v2/Git-Tools-Submodules )
26
29
for more information:
27
30
``` shell
28
- git config --global diff.submodule log
29
- git config --global status.submodulesummary 1
30
- git config --global push.recurseSubmodules check
31
+ $ git config --global diff.submodule log
32
+ $ git config --global status.submodulesummary 1
33
+ $ git config --global push.recurseSubmodules check
31
34
```
32
35
33
- 2 . Fork https://github.com/lampepfl/scala (in the following commands,
34
- ` dotty-staging/scala ` is used as a placeholder for your
35
- own fork).
36
- 3 . ``` shell
37
- cd scala-backend
38
- git remote add scala-staging
[email protected] :dotty-staging/scala.git
39
- cd ..
40
- ```
36
+ 2 . Fork scala from github
37
+
38
+ > https://github.com/lampepfl/scala
39
+
40
+ (in the following commands, ` dotty-staging/scala ` is used as a placeholder for your own fork).
41
+
42
+ 3 . Add the new remote to track the upstream branch
43
+ ``` shell
44
+ $ cd scala-backend
45
+ $ git remote add scala-staging
[email protected] :dotty-staging/scala.git
46
+ $ cd ..
47
+ ```
41
48
42
49
## Workflow when changing to the backend
43
50
44
51
``` shell
45
- cd scala-backend
46
- git checkout -b my-feature-branch
52
+ $ cd scala-backend
53
+ $ git checkout -b my-feature-branch
54
+
47
55
# Make some changes ...
56
+ $ git push -u scala-backend
48
57
49
- git push -u scala-backend
50
58
# Open a PR against https://github.com/lampepfl/scala/tree/sharing-backend
51
- cd ..
59
+ $ cd ..
52
60
```
53
61
54
62
Once your PR has been merged into the backend, you'll need to make another PR
0 commit comments