Skip to content

Commit

Permalink
support for scala 3.3.0-RC1
Browse files Browse the repository at this point in the history
  • Loading branch information
Roman Janusz committed Jan 25, 2023
1 parent 3a47ba5 commit 13f20ff
Show file tree
Hide file tree
Showing 4 changed files with 17 additions and 7 deletions.
14 changes: 12 additions & 2 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ jobs:
strategy:
matrix:
os: [ubuntu-latest]
scala: [3.2.2, 3.2.1, 2.13.10, 2.12.17]
scala: [3.3.0-RC1, 3.2.2, 3.2.1, 2.13.10, 2.12.17]
java: [temurin@17]
runs-on: ${{ matrix.os }}
steps:
Expand Down Expand Up @@ -73,7 +73,7 @@ jobs:
strategy:
matrix:
os: [ubuntu-latest]
scala: [3.2.2]
scala: [3.3.0-RC1]
java: [temurin@17]
runs-on: ${{ matrix.os }}
steps:
Expand Down Expand Up @@ -101,6 +101,16 @@ jobs:
~/Library/Caches/Coursier/v1
key: ${{ runner.os }}-sbt-cache-v2-${{ hashFiles('**/*.sbt') }}-${{ hashFiles('project/build.properties') }}

- name: Download target directories (3.3.0-RC1)
uses: actions/download-artifact@v2
with:
name: target-${{ matrix.os }}-3.3.0-RC1-${{ matrix.java }}

- name: Inflate target directories (3.3.0-RC1)
run: |
tar xf targets.tar
rm targets.tar
- name: Download target directories (3.2.2)
uses: actions/download-artifact@v2
with:
Expand Down
2 changes: 1 addition & 1 deletion build.sbt
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
inThisBuild(Seq(
organization := "com.github.ghik",
scalaVersion := crossScalaVersions.value.head,
crossScalaVersions := Seq("3.2.2", "3.2.1", "2.13.10", "2.12.17"),
crossScalaVersions := Seq("3.3.0-RC1", "3.2.2", "3.2.1", "2.13.10", "2.12.17"),

githubWorkflowTargetTags ++= Seq("v*"),
githubWorkflowJavaVersions := Seq(JavaSpec.temurin("17")),
Expand Down
2 changes: 1 addition & 1 deletion project/build.properties
Original file line number Diff line number Diff line change
@@ -1 +1 @@
sbt.version=1.8.0
sbt.version=1.8.2
Original file line number Diff line number Diff line change
Expand Up @@ -48,8 +48,8 @@ class ZerowastePhase extends PluginPhase {
dotty.tools.dotc.report.warning("discarded expression with non-Unit value", tree.srcPos)

private def complete[T <: AnyRef](v: Lazy[T] | T)(using Context): T = v match {
case l: Lazy[T] => l.complete
case t: T => t
case l: Lazy[T@unchecked] => l.complete
case t: T@unchecked => t
}

override def transformUnit(tree: Tree)(using Context): Tree = {
Expand Down Expand Up @@ -81,7 +81,7 @@ class ZerowastePhase extends PluginPhase {

case Template(constr, parents, self, body) =>
detectDiscarded(constr, discarded = false)
parents.foreach(detectDiscarded(_, discarded = false))
complete(parents).foreach(detectDiscarded(_, discarded = false))
detectDiscarded(self, discarded = false)
complete(body).foreach(detectDiscarded(_, discarded = true))

Expand Down

0 comments on commit 13f20ff

Please sign in to comment.