You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: docs/_docs/contributing/contributing.md
+21-21
Original file line number
Diff line number
Diff line change
@@ -5,9 +5,9 @@ The code in this repository is primarily divided into four top-level directories
5
5
*`j17/`: Java 17 specific parts of the Slinc implementation
6
6
*`j19/`: Java 19 specific parts of the Slinc implementation
7
7
*`runtime/`: The complete Slinc project, with Java 17 and 19 implementations combined and the correct implementation chosen at runtime by your system.
8
-
8
+
9
9
## Developing Slinc
10
-
Slinc is a somewhat involved project to program for. With implementations targeting Java 17 and Java 19, one needs access to both JDKs to develop and run the j17 and j19 projects.
10
+
Slinc is a somewhat involved project to program for. With implementations targeting Java 17 and Java 19, one needs access to both JDKs to develop and run the j17 and j19 projects.
11
11
12
12
### Sdkman
13
13
@@ -19,7 +19,7 @@ Once you have sdkman installed, you can use the following commands to install an
19
19
* Install: `sdk i java 19-tem`
20
20
* Use: `sdk u java 19-tem`
21
21
* Default: `sdk d java 19-tem`
22
-
22
+
23
23
#### Java 17
24
24
* Install: `sdk i java 17.0.4.1-tem`
25
25
* Use: `sdk u java 17.0.4.1-tem`
@@ -29,25 +29,25 @@ Once you have sdkman installed, you can use the following commands to install an
29
29
30
30
`Use` will set the JDK visible for a certain terminal instance. This is useful if you want to build the entire project. Use will only effect the JDK choice for the terminal it's invoked in, and will not affect the user default JVM.
31
31
32
-
`Default` will set the JDK that's visible for all programs launched after the command has been invoked. This is useful for reloading your code editor to work on a different java implementation for Slinc.
32
+
`Default` will set the JDK that's visible for all programs launched after the command has been invoked. This is useful for reloading your code editor to work on a different java implementation for Slinc.
33
33
34
34
### Editor
35
-
When developing Slinc, it's suggested to use [VSCode](https://code.visualstudio.com/) along with the [Metals](https://marketplace.visualstudio.com/items?itemName=scalameta.metals) extension. Slinc is heavily dependent on compile-time programming, and VSCode+Metals works very well with this development model. One can use other editors, but it's probably mandatory to use Metals.
35
+
When developing Slinc, it's suggested to use [VSCode](https://code.visualstudio.com/) along with the [Metals](https://marketplace.visualstudio.com/items?itemName=scalameta.metals) extension. Slinc is heavily dependent on compile-time programming, and VSCode+Metals works very well with this development model. One can use other editors, but it's probably mandatory to use Metals.
36
36
37
-
Using metals, one can import the build definition from mill. If one encounters an issue with the import failing for no discernable reason, try deleting the `out` directory and trying again. There is a problem with this project and mill failing to generate bloop configurations. If one encounters errors when viewing a code base that do not resolve themselves, it's suggested to try closing VSCode, killing all Java processes, and deleting .metals, .bloop, and out. Generally, this will fix all issues.
37
+
Using metals, one can import the build definition from mill. If one encounters an issue with the import failing for no discernable reason, try deleting the `out` directory and trying again. There is a problem with this project and mill failing to generate bloop configurations. If one encounters errors when viewing a code base that do not resolve themselves, it's suggested to try closing VSCode, killing all Java processes, and deleting .metals, .bloop, and out. Generally, this will fix all issues.
38
38
39
-
When developing for Slinc, choose an implementation to focus on, and choose the appropriate JDK for it. Switch with the appropriate `default` command on sdkman, kill all java processes, and afterwards open the project with VSCode. The corresponding `j` project should be having no missing definition errors after this process. Switching between JDK versions follows the same process.
39
+
When developing for Slinc, choose an implementation to focus on, and choose the appropriate JDK for it. Switch with the appropriate `default` command on sdkman, kill all java processes, and afterwards open the project with VSCode. The corresponding `j` project should be having no missing definition errors after this process. Switching between JDK versions follows the same process.
40
40
41
-
## Compiling
41
+
## Compiling
42
42
43
-
The following commands compile the Slinc projecs:
43
+
The following commands compile the Slinc projects:
44
44
45
45
* core: `./mill core.compile`
46
46
* j17: `./mill j17.compile`
47
47
* j19: `./mill j19.compile`
48
48
* runtime: `./mill runtime.compile`
49
49
50
-
Compiling the entire project would normally be done by running `./mill _.compile`, but considering the different project have different JDK requirements, the full compilation takes the form of
50
+
Compiling the entire project would normally be done by running `./mill _.compile`, but considering the different project have different JDK requirements, the full compilation takes the form of
51
51
52
52
```bash
53
53
sdk u java 17.0.4.1-tem && \
@@ -78,7 +78,7 @@ Testing code is generally stored in the `core` project under `core/test/src`. Ja
78
78
Tests in Slinc use munit and scalacheck. One can read how to use munit with scalacheck [here](https://scalameta.org/munit/docs/integrations/scalacheck.html) and how to use scalacheck [here](https://github.com/typelevel/scalacheck/blob/main/doc/UserGuide.md).
79
79
80
80
81
-
In order to develop a new test suite for Slinc, add the implementation to `core/test/src`. If the test suite is testing an implementation in `core` then one can define it in the normal way specified by the munit documentation. However, if it's meant to be a test of Slinc implementations, it should be defined in a generic fashion like so:
81
+
In order to develop a new test suite for Slinc, add the implementation to `core/test/src`. If the test suite is testing an implementation in `core` then one can define it in the normal way specified by the munit documentation. However, if it's meant to be a test of Slinc implementations, it should be defined in a generic fashion like so:
@@ -104,9 +104,9 @@ If one's test suite concerns JIT compilation, one can use `noJit` and `immediate
104
104
105
105
### Troubleshooting tests
106
106
107
-
Sometimes when running a freshly written test, or testing freshly written code, one might encounter a situation where the test suite will stop testing early, or never stop running.
107
+
Sometimes when running a freshly written test, or testing freshly written code, one might encounter a situation where the test suite will stop testing early, or never stop running.
108
108
109
-
Generally, the test suite will stop running early when some part of the Slinc runtime fails to initialize properly. One can easily detect if this is the case by moving some test code out of the test section into the root of the suite.
109
+
Generally, the test suite will stop running early when some part of the Slinc runtime fails to initialize properly. One can easily detect if this is the case by moving some test code out of the test section into the root of the suite.
0 commit comments