Skip to content

Commit 16b962e

Browse files
authored
Merge pull request #14156 from dotty-staging/scala-target-flag
Enable generation of TASTy files readable for older compilers
2 parents 9e14f5f + 85cf9be commit 16b962e

File tree

65 files changed

+757
-144
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

65 files changed

+757
-144
lines changed

.github/workflows/ci.yaml

Lines changed: 38 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -317,6 +317,43 @@ jobs:
317317
git submodule update --init --recursive --jobs 7
318318
./project/scripts/sbt "community-build/testOnly dotty.communitybuild.CommunityBuildTestC"
319319
320+
community_build_forward_compat:
321+
runs-on: [self-hosted, Linux]
322+
container:
323+
image: lampepfl/dotty:2021-03-22
324+
options: --cpu-shares 4096
325+
volumes:
326+
- ${{ github.workspace }}/../../cache/sbt:/root/.sbt
327+
- ${{ github.workspace }}/../../cache/ivy:/root/.ivy2/cache
328+
- ${{ github.workspace }}/../../cache/general:/root/.cache
329+
if: "github.event_name == 'schedule' && github.repository == 'lampepfl/dotty'
330+
|| (
331+
github.event_name == 'workflow_dispatch'
332+
&& github.repository == 'lampepfl/dotty'
333+
)"
334+
335+
steps:
336+
- name: Reset existing repo
337+
run: git -c "http.https://github.com/.extraheader=" fetch --recurse-submodules=no "https://github.com/lampepfl/dotty" && git reset --hard FETCH_HEAD || true
338+
339+
- name: Checkout cleanup script
340+
uses: actions/checkout@v2
341+
342+
- name: Cleanup
343+
run: .github/workflows/cleanup.sh
344+
345+
- name: Git Checkout
346+
uses: actions/checkout@v2
347+
348+
- name: Add SBT proxy repositories
349+
run: cp -vf .github/workflows/repositories /root/.sbt/ ; true
350+
351+
- name: Test
352+
run: |
353+
git submodule sync
354+
git submodule update --init --recursive --jobs 7
355+
./project/scripts/sbt "community-build/testOnly dotty.communitybuild.CommunityBuildTestForwardCompat"
356+
320357
test_sbt:
321358
runs-on: [self-hosted, Linux]
322359
container:
@@ -415,7 +452,7 @@ jobs:
415452
- ${{ github.workspace }}/../../cache/sbt:/root/.sbt
416453
- ${{ github.workspace }}/../../cache/ivy:/root/.ivy2/cache
417454
- ${{ github.workspace }}/../../cache/general:/root/.cache
418-
needs: [test_non_bootstrapped, test, community_build_a, community_build_b, community_build_c, test_sbt, test_java8]
455+
needs: [test_non_bootstrapped, test, community_build_a, community_build_b, community_build_c, community_build_forward_compat, test_sbt, test_java8]
419456
if: "(github.event_name == 'schedule' || github.event_name == 'workflow_dispatch') && github.repository == 'lampepfl/dotty'"
420457
env:
421458
NIGHTLYBUILD: yes

.gitmodules

Lines changed: 31 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -219,3 +219,34 @@
219219
[submodule "community-build/community-projects/spire"]
220220
path = community-build/community-projects/spire
221221
url = https://github.com/dotty-staging/spire.git
222+
[submodule "community-build/community-projects/munit-forward-compat"]
223+
path = community-build/community-projects/munit-forward-compat
224+
url = https://github.com/dotty-staging/munit.git
225+
[submodule "community-build/community-projects/discipline-forward-compat"]
226+
path = community-build/community-projects/discipline-forward-compat
227+
url = https://github.com/dotty-staging/discipline.git
228+
[submodule "community-build/community-projects/discipline-munit-forward-compat"]
229+
path = community-build/community-projects/discipline-munit-forward-compat
230+
url = https://github.com/dotty-staging/discipline-munit.git
231+
[submodule "community-build/community-projects/discipline-specs2-forward-compat"]
232+
path = community-build/community-projects/discipline-specs2-forward-compat
233+
url = https://github.com/dotty-staging/discipline-specs2.git
234+
[submodule "community-build/community-projects/simulacrum-scalafix-forward-compat"]
235+
path = community-build/community-projects/simulacrum-scalafix-forward-compat
236+
url = https://github.com/dotty-staging/simulacrum-scalafix.git
237+
[submodule "community-build/community-projects/cats-forward-compat"]
238+
path = community-build/community-projects/cats-forward-compat
239+
url = https://github.com/dotty-staging/cats.git
240+
[submodule "community-build/community-projects/cats-mtl-forward-compat"]
241+
path = community-build/community-projects/cats-mtl-forward-compat
242+
url = https://github.com/dotty-staging/cats-mtl.git
243+
[submodule "community-build/community-projects/coop-forward-compat"]
244+
path = community-build/community-projects/coop-forward-compat
245+
url = https://github.com/dotty-staging/coop.git
246+
[submodule "community-build/community-projects/cats-effect-3-forward-compat"]
247+
path = community-build/community-projects/cats-effect-3-forward-compat
248+
url = https://github.com/dotty-staging/cats-effect.git
249+
branch = series/3.x
250+
[submodule "community-build/community-projects/scalacheck-forward-compat"]
251+
path = community-build/community-projects/scalacheck-forward-compat
252+
url = https://github.com/dotty-staging/scalacheck

community-build/README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,6 @@ To add your project to the community build you can follow these steps:
1717

1818
2. Open a PR against this repo that:
1919
- Adds your project as a new git submodule
20-
- `git submodule add https://github.com/lampepfl/XYZ.git community-build/community-projects/XYZ`
20+
- `git submodule add https://github.com/dotty-staging/XYZ.git community-build/community-projects/XYZ`
2121
- Add the project to [projects.scala](https://github.com/lampepfl/dotty/blob/master/community-build/src/scala/dotty/communitybuild/projects.scala)
2222
- Adds a test in [CommunityBuildTest.scala](https://github.com/lampepfl/dotty/blob/master/community-build/test/scala/dotty/communitybuild/CommunityBuildTest.scala)

community-build/src/scala/dotty/communitybuild/CommunityBuildRunner.scala

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -17,10 +17,10 @@ object CommunityBuildRunner:
1717
* for more infrastructural details.
1818
*/
1919
extension (self: CommunityProject) def run()(using suite: CommunityBuildRunner): Unit =
20-
if self.requiresExperimental && !compilerSupportExperimental then
20+
if self.requiresExperimental && !self.compilerSupportExperimental then
2121
log(s"Skipping ${self.project} - it needs experimental features unsupported in this build.")
2222
return
23-
self.dependencies.foreach(_.publish())
23+
self.dependencies().foreach(_.publish())
2424
self.testOnlyDependencies().foreach(_.publish())
2525
suite.runProject(self)
2626

@@ -45,6 +45,7 @@ trait CommunityBuildRunner:
4545
val project = projectDef.project
4646
val command = projectDef.binaryName
4747
val arguments = projectDef.buildCommands
48+
val compilerVersion = projectDef.compilerVersion
4849

4950
@annotation.tailrec
5051
def execTimes(task: () => Int, timesToRerun: Int): Boolean =

community-build/src/scala/dotty/communitybuild/Main.scala

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -57,7 +57,7 @@ object Main:
5757
val (toRun, ignored) =
5858
allProjects.partition( p =>
5959
p.docCommand != null
60-
&& (!p.requiresExperimental || compilerSupportExperimental)
60+
&& (!p.requiresExperimental || p.compilerSupportExperimental)
6161
)
6262

6363
val paths = toRun.map { project =>

0 commit comments

Comments
 (0)