Skip to content

Commit

Permalink
Add Scala 3.2.0 (#107)
Browse files Browse the repository at this point in the history
* Add Scala 3.2.0

* (hopefully) fix tests and simplify unmanaged source folders
  • Loading branch information
keynmol authored Sep 6, 2022
1 parent 383b8ee commit 2ab98e6
Show file tree
Hide file tree
Showing 8 changed files with 21 additions and 3 deletions.
11 changes: 11 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -42,6 +42,7 @@ jobs:
- 3.1.1
- 3.1.2
- 3.1.3
- 3.2.0
java: [[email protected]]
runs-on: ${{ matrix.os }}
steps:
Expand Down Expand Up @@ -255,6 +256,16 @@ jobs:
tar xf targets.tar
rm targets.tar
- name: Download target directories (3.2.0)
uses: actions/download-artifact@v2
with:
name: target-${{ matrix.os }}-3.2.0-${{ matrix.java }}

- name: Inflate target directories (3.2.0)
run: |
tar xf targets.tar
rm targets.tar
- uses: olafurpg/setup-gpg@v3

- run: sbt ++${{ matrix.scala }} ci-release
1 change: 1 addition & 0 deletions .mergify.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@ pull_request_rules:
- status-success="Build and Test (ubuntu-latest, 3.1.1, [email protected])"
- status-success="Build and Test (ubuntu-latest, 3.1.2, [email protected])"
- status-success="Build and Test (ubuntu-latest, 3.1.3, [email protected])"
- status-success="Build and Test (ubuntu-latest, 3.2.0, [email protected])"
actions:
merge:
method: merge
1 change: 1 addition & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,7 @@ The plugin is currently published for the following Scala versions:
- 2.13.5, 2.13.6, 2.13.7, 2.13.8
- 3.0.0, 3.0.1, 3.0.2
- 3.1.0, 3.1.1, 3.1.2, 3.1.3
- 3.2.0
<!-- SCALA VERSIONS END -->

For older Scala versions, see [previous versions of better-tostring](https://repo1.maven.org/maven2/org/polyvariant) ([or even older versions](https://repo1.maven.org/maven2/org/polyvariant)).
Expand Down
5 changes: 3 additions & 2 deletions build.sbt
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ Global / onChangedBuildSource := ReloadOnSourceChanges
ThisBuild / resolvers += Resolver.JCenterRepository

ThisBuild / scalaVersion := "3.0.0"
ThisBuild / crossScalaVersions := IO.read(file("scala-versions")).split("\n")
ThisBuild / crossScalaVersions := IO.read(file("scala-versions")).split("\n").map(_.trim)

ThisBuild / githubWorkflowJavaVersions := Seq(GraalVM11)

Expand Down Expand Up @@ -89,7 +89,8 @@ val plugin = project.settings(
Compile / unmanagedSourceDirectories ++= {
val extraDirectoriesWithPredicates = Map[String, String => Boolean](
("scala-3.0.x", (_.startsWith("3.0"))),
("scala-3.1.0+", (v => v.startsWith("3") && !v.startsWith("3.0")))
("scala-3.1.x", (_.startsWith("3.1"))),
("scala-3.2.x", (_.startsWith("3.2")))
)

extraDirectoriesWithPredicates.collect {
Expand Down
3 changes: 3 additions & 0 deletions plugin/src/main/scala-3.2.x/AfterPhase.scala
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
package org.polyvariant

val AfterPhase = dotty.tools.dotc.typer.TyperPhase
2 changes: 1 addition & 1 deletion project/ReadmePlugin.scala
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ object ReadmePlugin extends AutoPlugin {

def pattern(inside: String) = s"""<!-- SCALA VERSIONS START -->$inside<!-- SCALA VERSIONS END -->"""

val groups = List("2.12", "2.13", "3.0", "3.1")
val groups = List("2.12", "2.13", "3.0", "3.1", "3.2")

val versionsGrouped = crossScalaVersions.value.groupBy { v =>
groups.find(v.startsWith(_)).getOrElse(sys.error("Unknown group for version: " + v))
Expand Down
1 change: 1 addition & 0 deletions scala-versions
Original file line number Diff line number Diff line change
Expand Up @@ -12,3 +12,4 @@
3.1.1
3.1.2
3.1.3
3.2.0

0 comments on commit 2ab98e6

Please sign in to comment.