Skip to content

Commit

Permalink
Merge pull request #37 from jatcwang/update_deps_3.3.3
Browse files Browse the repository at this point in the history
Dependency updates (Scala 3.3.3)
  • Loading branch information
jatcwang authored Aug 31, 2024
2 parents 47a5ead + c16dd01 commit 1a77c27
Show file tree
Hide file tree
Showing 6 changed files with 23 additions and 25 deletions.
10 changes: 5 additions & 5 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -44,10 +44,10 @@ jobs:
- name: Setup ruby
uses: ruby/setup-ruby@v1
with:
ruby-version: 2.7
ruby-version: 3.3

- name: Install Jekyll (to build microsite)
run: gem install jekyll -v 4.1.1
run: gem install jekyll -v 4.3.3

- name: Check that workflows are up to date
run: sbt githubWorkflowCheck
Expand All @@ -62,7 +62,7 @@ jobs:
strategy:
matrix:
os: [ubuntu-latest]
scala: [2.13.11]
scala: [2.13.14]
java: [temurin@11]
runs-on: ${{ matrix.os }}
steps:
Expand All @@ -82,10 +82,10 @@ jobs:
- name: Setup ruby
uses: ruby/setup-ruby@v1
with:
ruby-version: 2.7
ruby-version: 3.3

- name: Install Jekyll (to build microsite)
run: gem install jekyll -v 4.1.1
run: gem install jekyll -v 4.3.3

- env:
PGP_PASSPHRASE: ${{ secrets.PGP_PASSPHRASE }}
Expand Down
25 changes: 13 additions & 12 deletions build.sbt
Original file line number Diff line number Diff line change
Expand Up @@ -3,10 +3,11 @@ import sbtghactions.JavaSpec
import complete.DefaultParsers._
import sbt.Reference.display

val munitVersion = "0.7.29"
val catsVersion = "2.9.0"
val scalatestVersion = "3.2.16"
val weaverVersion = "0.8.3"
val munitVersion = "0.7.29" // Upgrading to 1.0.1 seems to break Scala 3 DifferAutoDerivationSpec.scala..
val munitScalacheckVersion = "0.7.29"
val catsVersion = "2.12.0"
val scalatestVersion = "3.2.19"
val weaverVersion = "0.8.4"

val isScala3 = Def.setting {
// doesn't work well with >= 3.0.0 for `3.0.0-M1`
Expand Down Expand Up @@ -46,13 +47,13 @@ lazy val core = projectMatrix
.settings(
name := "difflicious-core",
libraryDependencies ++= Seq(
"dev.zio" %% "izumi-reflect" % "2.3.8",
"com.lihaoyi" %% "fansi" % "0.4.0",
"dev.zio" %% "izumi-reflect" % "2.3.10",
"com.lihaoyi" %% "fansi" % "0.5.0",
) ++ (if (isScala3.value) {
Seq("com.softwaremill.magnolia1_3" %% "magnolia" % "1.0.0")
Seq("com.softwaremill.magnolia1_3" %% "magnolia" % "1.3.7")
} else
Seq(
"com.softwaremill.magnolia1_2" %% "magnolia" % "1.0.0",
"com.softwaremill.magnolia1_2" %% "magnolia" % "1.1.10",
"org.scala-lang" % "scala-reflect" % Build.Scala213,
)),
Compile / sourceGenerators += Def.task {
Expand Down Expand Up @@ -126,7 +127,7 @@ lazy val coretest = projectMatrix
// Test deps
libraryDependencies ++= Seq(
"org.scalameta" %% "munit" % munitVersion,
"org.scalameta" %% "munit-scalacheck" % munitVersion,
"org.scalameta" %% "munit-scalacheck" % munitScalacheckVersion,
).map(_ % Test),
)
.jvmPlatform(jvmScalaVersions)
Expand Down Expand Up @@ -202,7 +203,7 @@ lazy val commonSettings = Seq(
versionScheme := Some("early-semver"),
scalacOptions ++= (if (isScala3.value) Seq.empty[String] else Seq("-Wmacros:after")),
libraryDependencies ++= Seq(
compilerPlugin("org.typelevel" %% "kind-projector" % "0.13.2" cross CrossVersion.full),
compilerPlugin("org.typelevel" %% "kind-projector" % "0.13.3" cross CrossVersion.full),
compilerPlugin("com.olegpy" %% "better-monadic-for" % "0.3.1"),
).filterNot(_ => isScala3.value),
)
Expand Down Expand Up @@ -232,10 +233,10 @@ val setupJekyllSteps = Seq(
WorkflowStep.Use(
UseRef.Public("ruby", "setup-ruby", "v1"),
name = Some("Setup ruby"),
params = Map("ruby-version" -> "2.7"),
params = Map("ruby-version" -> "3.3"),
),
WorkflowStep.Run(
List("gem install jekyll -v 4.1.1"),
List("gem install jekyll -v 4.3.3"),
name = Some("Install Jekyll (to build microsite)"),
),
)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,6 @@ import difflicious.{ConfigurePath, Differ}
import difflicious.ConfigureOp.PairBy
import difflicious.internal.EitherGetSyntax.EitherExtensionOps

import scala.annotation.nowarn

// pairBy has to be defined differently for better type inference.
final class PairByOps[F[_], A](differ: Differ[F[A]]) {
def pairBy[B](f: A => B): Differ[F[A]] =
Expand All @@ -17,6 +15,5 @@ final class PairByOps[F[_], A](differ: Differ[F[A]]) {
}

trait ToPairByOps {
@nowarn("msg=.*never used.*")
implicit def toPairByOps[F[_]: Pairable, A](differ: Differ[F[A]]): PairByOps[F, A] = new PairByOps(differ)
}
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
package difflicioustest

import munit.ScalaCheckSuite
import munit.FunSuite

class DifferAutoDerivationSpec extends ScalaCheckSuite {
class DifferAutoDerivationSpec extends FunSuite {
test("should not compile without instance in scope") {
val result = compileErrors("""
import difflicious._
Expand Down
4 changes: 2 additions & 2 deletions project/Build.scala
Original file line number Diff line number Diff line change
Expand Up @@ -9,8 +9,8 @@ import sbtprojectmatrix.ProjectMatrixPlugin.autoImport.virtualAxes

object Build {

val Scala213 = "2.13.11"
val Scala3 = "3.3.0"
val Scala213 = "2.13.14"
val Scala3 = "3.3.3"

// copied from: https://github.com/disneystreaming/smithy4s/blob/21a6fb04ab3485c0a4b40fe205a628c6f4750813/project/Smithy4sBuildPlugin.scala#L508
def createBuildCommands(projects: Seq[ProjectReference]) = {
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.9.2
sbt.version=1.10.1

0 comments on commit 1a77c27

Please sign in to comment.