Skip to content

Commit

Permalink
Introduce scala 3 build for spray-json
Browse files Browse the repository at this point in the history
  • Loading branch information
satabin committed Dec 3, 2023
1 parent 445d792 commit dfa652c
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 8 deletions.
4 changes: 2 additions & 2 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -80,11 +80,11 @@ jobs:

- name: Make target directories
if: github.event_name != 'pull_request' && (startsWith(github.ref, 'refs/tags/v') || github.ref == 'refs/heads/main')
run: mkdir -p circe/jvm/target playJson/native/target testkit/native/target testkit/js/target core/.native/target playJson/jvm/target sprayJson/target core/.js/target circe/js/target core/.jvm/target circe/native/target playJson/js/target testkit/jvm/target project/target
run: mkdir -p circe/jvm/target playJson/native/target testkit/native/target testkit/js/target core/.native/target playJson/jvm/target core/.js/target circe/js/target core/.jvm/target circe/native/target playJson/js/target testkit/jvm/target sprayJson/jvm/target project/target

- name: Compress target directories
if: github.event_name != 'pull_request' && (startsWith(github.ref, 'refs/tags/v') || github.ref == 'refs/heads/main')
run: tar cf targets.tar circe/jvm/target playJson/native/target testkit/native/target testkit/js/target core/.native/target playJson/jvm/target sprayJson/target core/.js/target circe/js/target core/.jvm/target circe/native/target playJson/js/target testkit/jvm/target project/target
run: tar cf targets.tar circe/jvm/target playJson/native/target testkit/native/target testkit/js/target core/.native/target playJson/jvm/target core/.js/target circe/js/target core/.jvm/target circe/native/target playJson/js/target testkit/jvm/target sprayJson/jvm/target project/target

- name: Upload target directories
if: github.event_name != 'pull_request' && (startsWith(github.ref, 'refs/tags/v') || github.ref == 'refs/heads/main')
Expand Down
12 changes: 7 additions & 5 deletions build.sbt
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,8 @@ lazy val core = crossProject(JSPlatform, JVMPlatform, NativePlatform)
),
mimaBinaryIssueFilters ++= List(
ProblemFilters.exclude[DirectMissingMethodProblem](
"diffson.jsonpatch.package#simplediff#remembering.JsonDiffDiff")
"diffson.jsonpatch.package#simplediff#remembering.JsonDiffDiff"),
ProblemFilters.exclude[DirectAbstractMethodProblem]("diffson.lcs.Lcs.savedHashes")
)
)

Expand All @@ -58,13 +59,14 @@ lazy val testkit = crossProject(JSPlatform, JVMPlatform, NativePlatform)
"org.scalacheck" %%% "scalacheck" % scalacheckVersion))
.dependsOn(core)

lazy val sprayJson = project
lazy val sprayJson = crossProject(JVMPlatform)
.crossType(CrossType.Pure)
.in(file("sprayJson"))
.settings(commonSettings: _*)
.settings(name := "diffson-spray-json",
crossScalaVersions := Seq(scala212, scala213),
libraryDependencies += "io.spray" %% "spray-json" % "1.3.6")
.dependsOn(core.jvm, testkit.jvm % Test)
libraryDependencies += "io.spray" %% "spray-json" % "1.3.6",
tlVersionIntroduced := Map("3" -> "4.4.1"))
.dependsOn(core, testkit % Test)

lazy val playJson = crossProject(JSPlatform, JVMPlatform, NativePlatform)
.crossType(CrossType.Full)
Expand Down
2 changes: 1 addition & 1 deletion core/src/main/scala/diffson/lcs/HashedLcs.scala
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ import cats.implicits._
*/
class HashedLcs[T: Eq](delegate: Lcs[Hashed[T]]) extends Lcs[T] {

def savedHashes = this
override def savedHashes: HashedLcs[T] = this

override def lcs(seq1: List[T], seq2: List[T], low1: Int, high1: Int, low2: Int, high2: Int): List[(Int, Int)] = {
// wrap all values and delegate to proper implementation
Expand Down

0 comments on commit dfa652c

Please sign in to comment.