Skip to content

Commit

Permalink
Merge pull request #14156 from dotty-staging/scala-target-flag
Browse files Browse the repository at this point in the history
Enable generation of TASTy files readable for older compilers
  • Loading branch information
prolativ committed Jan 19, 2022
2 parents 9e14f5f + 85cf9be commit 16b962e
Show file tree
Hide file tree
Showing 65 changed files with 757 additions and 144 deletions.
39 changes: 38 additions & 1 deletion .github/workflows/ci.yaml
Expand Up @@ -317,6 +317,43 @@ jobs:
git submodule update --init --recursive --jobs 7
./project/scripts/sbt "community-build/testOnly dotty.communitybuild.CommunityBuildTestC"
community_build_forward_compat:
runs-on: [self-hosted, Linux]
container:
image: lampepfl/dotty:2021-03-22
options: --cpu-shares 4096
volumes:
- ${{ github.workspace }}/../../cache/sbt:/root/.sbt
- ${{ github.workspace }}/../../cache/ivy:/root/.ivy2/cache
- ${{ github.workspace }}/../../cache/general:/root/.cache
if: "github.event_name == 'schedule' && github.repository == 'lampepfl/dotty'
|| (
github.event_name == 'workflow_dispatch'
&& github.repository == 'lampepfl/dotty'
)"

steps:
- name: Reset existing repo
run: git -c "http.https://github.com/.extraheader=" fetch --recurse-submodules=no "https://github.com/lampepfl/dotty" && git reset --hard FETCH_HEAD || true

- name: Checkout cleanup script
uses: actions/checkout@v2

- name: Cleanup
run: .github/workflows/cleanup.sh

- name: Git Checkout
uses: actions/checkout@v2

- name: Add SBT proxy repositories
run: cp -vf .github/workflows/repositories /root/.sbt/ ; true

- name: Test
run: |
git submodule sync
git submodule update --init --recursive --jobs 7
./project/scripts/sbt "community-build/testOnly dotty.communitybuild.CommunityBuildTestForwardCompat"
test_sbt:
runs-on: [self-hosted, Linux]
container:
Expand Down Expand Up @@ -415,7 +452,7 @@ jobs:
- ${{ github.workspace }}/../../cache/sbt:/root/.sbt
- ${{ github.workspace }}/../../cache/ivy:/root/.ivy2/cache
- ${{ github.workspace }}/../../cache/general:/root/.cache
needs: [test_non_bootstrapped, test, community_build_a, community_build_b, community_build_c, test_sbt, test_java8]
needs: [test_non_bootstrapped, test, community_build_a, community_build_b, community_build_c, community_build_forward_compat, test_sbt, test_java8]
if: "(github.event_name == 'schedule' || github.event_name == 'workflow_dispatch') && github.repository == 'lampepfl/dotty'"
env:
NIGHTLYBUILD: yes
Expand Down
31 changes: 31 additions & 0 deletions .gitmodules
Expand Up @@ -219,3 +219,34 @@
[submodule "community-build/community-projects/spire"]
path = community-build/community-projects/spire
url = https://github.com/dotty-staging/spire.git
[submodule "community-build/community-projects/munit-forward-compat"]
path = community-build/community-projects/munit-forward-compat
url = https://github.com/dotty-staging/munit.git
[submodule "community-build/community-projects/discipline-forward-compat"]
path = community-build/community-projects/discipline-forward-compat
url = https://github.com/dotty-staging/discipline.git
[submodule "community-build/community-projects/discipline-munit-forward-compat"]
path = community-build/community-projects/discipline-munit-forward-compat
url = https://github.com/dotty-staging/discipline-munit.git
[submodule "community-build/community-projects/discipline-specs2-forward-compat"]
path = community-build/community-projects/discipline-specs2-forward-compat
url = https://github.com/dotty-staging/discipline-specs2.git
[submodule "community-build/community-projects/simulacrum-scalafix-forward-compat"]
path = community-build/community-projects/simulacrum-scalafix-forward-compat
url = https://github.com/dotty-staging/simulacrum-scalafix.git
[submodule "community-build/community-projects/cats-forward-compat"]
path = community-build/community-projects/cats-forward-compat
url = https://github.com/dotty-staging/cats.git
[submodule "community-build/community-projects/cats-mtl-forward-compat"]
path = community-build/community-projects/cats-mtl-forward-compat
url = https://github.com/dotty-staging/cats-mtl.git
[submodule "community-build/community-projects/coop-forward-compat"]
path = community-build/community-projects/coop-forward-compat
url = https://github.com/dotty-staging/coop.git
[submodule "community-build/community-projects/cats-effect-3-forward-compat"]
path = community-build/community-projects/cats-effect-3-forward-compat
url = https://github.com/dotty-staging/cats-effect.git
branch = series/3.x
[submodule "community-build/community-projects/scalacheck-forward-compat"]
path = community-build/community-projects/scalacheck-forward-compat
url = https://github.com/dotty-staging/scalacheck
2 changes: 1 addition & 1 deletion community-build/README.md
Expand Up @@ -17,6 +17,6 @@ To add your project to the community build you can follow these steps:

2. Open a PR against this repo that:
- Adds your project as a new git submodule
- `git submodule add https://github.com/lampepfl/XYZ.git community-build/community-projects/XYZ`
- `git submodule add https://github.com/dotty-staging/XYZ.git community-build/community-projects/XYZ`
- Add the project to [projects.scala](https://github.com/lampepfl/dotty/blob/master/community-build/src/scala/dotty/communitybuild/projects.scala)
- Adds a test in [CommunityBuildTest.scala](https://github.com/lampepfl/dotty/blob/master/community-build/test/scala/dotty/communitybuild/CommunityBuildTest.scala)
1 change: 1 addition & 0 deletions community-build/community-projects/cats-forward-compat
Submodule cats-forward-compat added at 878472
1 change: 1 addition & 0 deletions community-build/community-projects/cats-mtl-forward-compat
1 change: 1 addition & 0 deletions community-build/community-projects/coop-forward-compat
Submodule coop-forward-compat added at 4babee
1 change: 1 addition & 0 deletions community-build/community-projects/munit-forward-compat
Submodule munit-forward-compat added at 662953
Expand Up @@ -17,10 +17,10 @@ object CommunityBuildRunner:
* for more infrastructural details.
*/
extension (self: CommunityProject) def run()(using suite: CommunityBuildRunner): Unit =
if self.requiresExperimental && !compilerSupportExperimental then
if self.requiresExperimental && !self.compilerSupportExperimental then
log(s"Skipping ${self.project} - it needs experimental features unsupported in this build.")
return
self.dependencies.foreach(_.publish())
self.dependencies().foreach(_.publish())
self.testOnlyDependencies().foreach(_.publish())
suite.runProject(self)

Expand All @@ -45,6 +45,7 @@ trait CommunityBuildRunner:
val project = projectDef.project
val command = projectDef.binaryName
val arguments = projectDef.buildCommands
val compilerVersion = projectDef.compilerVersion

@annotation.tailrec
def execTimes(task: () => Int, timesToRerun: Int): Boolean =
Expand Down
2 changes: 1 addition & 1 deletion community-build/src/scala/dotty/communitybuild/Main.scala
Expand Up @@ -57,7 +57,7 @@ object Main:
val (toRun, ignored) =
allProjects.partition( p =>
p.docCommand != null
&& (!p.requiresExperimental || compilerSupportExperimental)
&& (!p.requiresExperimental || p.compilerSupportExperimental)
)

val paths = toRun.map { project =>
Expand Down

0 comments on commit 16b962e

Please sign in to comment.