|
1 | 1 | # Scala 3 Community Build
|
2 | 2 |
|
3 |
| -This project contains tests to build and test a corpus of open sources Scala |
4 |
| -projects against the latest version of Scala 3. |
5 |
| - |
6 |
| -## Running it locally |
7 |
| - |
8 |
| -To run the community build on a local machine, first fetch all the git |
9 |
| -submodules with `git submodule update --init` and run `sbt community-build/test` |
10 |
| -from the root of the dotty repo. |
11 |
| - |
12 |
| -To run a single project, you can use the usual syntax for running a single JUnit |
13 |
| -test, for example `community-build/testOnly -- *shapeless` |
14 |
| - |
15 |
| -In CI the community build is split up into 3 seperate groups: A, B, and C. To |
16 |
| -run one specific build you can also use the same JUnit syntax as above targeting |
17 |
| -the individual group. For example: |
18 |
| - |
19 |
| -``` |
20 |
| -sbt "community-build/testOnly dotty.communitybuild.CommunityBuildTestA" |
21 |
| -``` |
22 |
| - |
23 |
| -## Adding your project |
24 |
| - |
25 |
| -The community build is able to handle both Mill and sbt projects. To add your |
26 |
| -project to the community build you can follow these steps: |
27 |
| - |
28 |
| -1. Ensure your project is compiling with Scala 3. If you need help make sure to |
29 |
| - check out the [Scala 3 Migration |
30 |
| - Guide](https://docs.scala-lang.org/scala3/guides/migration/compatibility-intro.html). |
31 |
| - You can see the submodules in |
32 |
| - [community-projects](https://github.com/lampepfl/dotty/tree/main/community-build/community-projects/) |
33 |
| - for examples of projects that compile with Scala 3. |
34 |
| - |
35 |
| -2. Open a PR against this repo that: |
36 |
| - - Adds your project as a new git submodule |
37 |
| - - `git submodule add https://github.com/dotty-staging/XYZ.git community-build/community-projects/XYZ` |
38 |
| - - Add the project to [projects.scala](https://github.com/lampepfl/dotty/blob/main/community-build/src/scala/dotty/communitybuild/projects.scala) |
39 |
| - - Adds a test in [CommunityBuildTest.scala](https://github.com/lampepfl/dotty/blob/main/community-build/test/scala/dotty/communitybuild/CommunityBuildTest.scala) |
40 |
| - |
41 |
| -3. Once the CI is green, someone from the Dotty team will fork your repo and add |
42 |
| - it to [dotty-staging](https://github.com/dotty-staging). This enables us to |
43 |
| - make changes to your fork if necessary to keep the community build running |
44 |
| - smoothly. |
45 |
| - |
46 |
| -4. Once the fork is created, please update your PR to point to this new fork |
47 |
| - instead of your repo. |
48 |
| - |
49 |
| -## Updating a project |
50 |
| - |
51 |
| -The projects included in the community build are all forked and located in |
52 |
| -[dotty-staging](https://github.com/dotty-staging). When something needs to be |
53 |
| -bumped the process is as follows: |
54 |
| - |
55 |
| -1. Fork the dotty staging repo and sync it with the upstream project. |
56 |
| - |
57 |
| -2. Once you've verified that the tests are all passing you can then either |
58 |
| - request in your PR that the dotty-staging fork be synced or in the |
59 |
| - [scala-contributors](https://discord.com/channels/632150470000902164/632628489719382036) |
60 |
| - discord channel. |
61 |
| - |
62 |
| -### Some helpful tips |
63 |
| - |
64 |
| -- If you're unfamiliar with Git Submodules you can find a nice guide to get |
65 |
| - familiar with them [here](https://git-scm.com/book/en/v2/Git-Tools-Submodules). |
66 |
| -- Keep in mind that many projects are interrelated. So when you bump one that |
67 |
| - change may cascade through multiple different projects causing you to have |
68 |
| - to bump multiple. Plan accordingly and at times it's best to pin it to a |
69 |
| - stable release version, especially if it's a root library that many others |
70 |
| - in the community build are relying on. |
71 |
| - |
72 |
| -## Looking for the "unmanaged" Scala 3 community build? |
73 |
| - |
74 |
| -You can find this [here](https://github.com/VirtusLab/community-build3). |
75 |
| - |
| 3 | +For information on the community build check out the [Community Build section of |
| 4 | +the Contributing |
| 5 | +Docs](https://dotty.epfl.ch/docs/contributing/community-build.html). |
0 commit comments