Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions .git-blame-ignore-revs
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
# Scala Steward: Reformat with scalafmt 3.10.7
8e78f878e58dd04458c9612471f6c2af963bb136
2 changes: 1 addition & 1 deletion .scalafmt.conf
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
version = 3.9.10
version = 3.10.7

align.preset = more
assumeStandardLibraryStripMargin = true
Expand Down
28 changes: 15 additions & 13 deletions build.sbt
Original file line number Diff line number Diff line change
Expand Up @@ -5,10 +5,10 @@ import java.net.URI
inThisBuild(
Seq(
organization := "io.bullet",
homepage := Some(URI.create("https://github.com/sirthias/spliff/").toURL),
description := "Efficient diffing in Scala",
startYear := Some(2020),
licenses := Seq("MPLv2" -> URI.create("https://www.mozilla.org/en-US/MPL/2.0/").toURL),
homepage := Some(URI.create("https://github.com/sirthias/spliff/").toURL),
description := "Efficient diffing in Scala",
startYear := Some(2020),
licenses := Seq("MPLv2" -> URI.create("https://www.mozilla.org/en-US/MPL/2.0/").toURL),
scmInfo := Some(ScmInfo(url("https://github.com/sirthias/spliff/"), "scm:git:git@github.com:sirthias/spliff.git")),
developers :=
List(
Expand All @@ -21,17 +21,18 @@ inThisBuild(
)

lazy val commonSettings = Seq(
scalaVersion := "2.13.17",
scalaVersion := "2.13.17",
crossScalaVersions := Seq("2.13.17", "3.3.7"),
libraryDependencies ++= Seq(
"org.scalameta" %% "munit" % "1.2.1" % Test,
"org.scalameta" %% "munit-scalacheck" % "1.2.0" % Test,
"org.scalameta" %% "munit" % "1.2.1" % Test,
"org.scalameta" %% "munit-scalacheck" % "1.2.0" % Test,
"org.scalacheck" %% "scalacheck" % "1.19.0" % Test
),
Compile / doc / scalacOptions += "-no-link-warnings",
scalacOptions ++= Seq(
"-deprecation",
"-encoding", "UTF-8",
"-encoding",
"UTF-8",
"-feature",
"-language:implicitConversions",
"-release:8",
Expand All @@ -49,7 +50,8 @@ lazy val commonSettings = Seq(
"-Wunused",
"-Xlint",
"-Xsource:3",
"-Ybackend-parallelism", "8",
"-Ybackend-parallelism",
"8",
"-Ycache-macro-class-loader:last-modified",
)
case Some((3, _)) =>
Expand All @@ -69,10 +71,10 @@ lazy val commonSettings = Seq(
headerLicense := Some(HeaderLicense.MPLv2("2021 - 2024", "Mathias Doenitz")),

// publishing
publishMavenStyle := true,
publishMavenStyle := true,
Test / publishArtifact := false,
pomIncludeRepository := (_ β‡’ false),
publishTo := sonatypePublishToBundle.value,
pomIncludeRepository := (_ β‡’ false),
publishTo := sonatypePublishToBundle.value,
sonatypeCredentialHost := xerial.sbt.Sonatype.sonatypeCentralHost,
)

Expand All @@ -86,7 +88,7 @@ lazy val releaseSettings = {
import ReleaseTransformations._
Seq(
releaseCrossBuild := true,
releaseProcess := Seq[ReleaseStep](
releaseProcess := Seq[ReleaseStep](
checkSnapshotDependencies,
inquireVersions,
runClean,
Expand Down
8 changes: 4 additions & 4 deletions spliff/src/main/scala/io/bullet/spliff/Diff.scala
Original file line number Diff line number Diff line change
Expand Up @@ -794,8 +794,8 @@ object Diff {

@tailrec def rec(dimIx: Int, resIx: Int, last: Op): Int =
if (dimIx < dimArray.length) {
val op = dimArray(dimIx)
var ir1 = resIx
val op = dimArray(dimIx)
var ir1 = resIx
val next = last -> op match {
case (Op.Delete(delBaseIx, delCnt), Op.Insert(insBaseIx, targetIx, insCnt)) if delBaseIx == insBaseIx =>
ir1 = resIx - 1
Expand Down Expand Up @@ -894,7 +894,7 @@ object Diff {
case (InTarget(b), InBase(a)) => Distinct(a, b)
case (Distinct(a, b), InBase(c)) => Distinct(a merge c, b)
case (Distinct(a, b), InTarget(c)) => Distinct(a, b merge c)
case _ =>
case _ =>
buf += last
next
}
Expand Down Expand Up @@ -929,7 +929,7 @@ object Diff {
def patch(implicit ct: ClassTag[T]): Patch[T] = {
val steps = delInsMovOps.map {
case Op.Insert(baseIx, targetIx, count) =>
val values = new Array[T](count)
val values = new Array[T](count)
@tailrec def rec(i: Int): Array[T] =
if (i < values.length) rec(setAndGetNextIndex(values, i, target(targetIx + i))) else values
Patch.Insert(baseIx, ArraySeq.unsafeWrapArray(rec(0)))
Expand Down