Skip to content

Commit

Permalink
Merge branch 'main' into update/scalafmt-core-3.8.5
Browse files Browse the repository at this point in the history
  • Loading branch information
mpilquist authored Jan 19, 2025
2 parents 6300d01 + 42e3fa2 commit 6156b56
Show file tree
Hide file tree
Showing 7 changed files with 33 additions and 31 deletions.
14 changes: 8 additions & 6 deletions .scalafmt.conf
Original file line number Diff line number Diff line change
@@ -1,13 +1,15 @@
version = "3.8.5"

maxColumn: 120

runner.dialect = scala213source3

fileOverride {
"glob:**/scala-3/**" {
runner.dialect = scala3
}
}
project.layout = StandardConvention

docstrings.wrap = "no"
rewrite.scala3.convertToNewSyntax = true
rewrite.scala3.newSyntax.control = false
runner.dialectOverride.allowUnderscoreAsTypePlaceholder = false
runner.dialectOverride.allowSignificantIndentation = false
runner.dialectOverride.allowStarWildcardImport = false

docstrings.wrap = "no"
8 changes: 4 additions & 4 deletions build.sbt
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ ThisBuild / developers ++= List(

ThisBuild / githubWorkflowJavaVersions := Seq(JavaSpec.temurin("8"))

ThisBuild / crossScalaVersions := List("2.12.20", "2.13.15", "3.3.4")
ThisBuild / crossScalaVersions := List("2.12.20", "2.13.16", "3.3.4")

ThisBuild / tlVersionIntroduced := Map("3" -> "3.0.3")

Expand Down Expand Up @@ -55,7 +55,7 @@ lazy val testKit = crossProject(JVMPlatform, JSPlatform, NativePlatform)
)
)
.jvmSettings(
libraryDependencies += "com.google.guava" % "guava" % "33.3.1-jre" % "test"
libraryDependencies += "com.google.guava" % "guava" % "33.4.0-jre" % "test"
)
.dependsOn(core % "compile->compile")

Expand All @@ -82,7 +82,7 @@ lazy val core = crossProject(JVMPlatform, JSPlatform, NativePlatform)
libraryDependencies ++= Seq(
"org.typelevel" %%% "literally" % "1.1.0",
"org.typelevel" %%% "cats-core" % "2.10.0",
"org.typelevel" %%% "cats-effect" % "3.5.5",
"org.typelevel" %%% "cats-effect" % "3.5.7",
"org.scalacheck" %%% "scalacheck" % "1.17.1" % Test
)
)
Expand Down Expand Up @@ -116,7 +116,7 @@ lazy val docs = project
mdocIn := baseDirectory.value / "src",
mdocOut := baseDirectory.value / "../docs",
githubWorkflowArtifactUpload := false,
libraryDependencies += "org.typelevel" %%% "cats-effect" % "3.5.5"
libraryDependencies += "org.typelevel" %%% "cats-effect" % "3.5.7"
)

lazy val commonSettings = Seq(
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.10.5
sbt.version=1.10.7
6 changes: 3 additions & 3 deletions project/plugins.sbt
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
addSbtPlugin("org.typelevel" % "sbt-typelevel" % "0.7.4")
addSbtPlugin("org.scala-js" % "sbt-scalajs" % "1.17.0")
addSbtPlugin("org.scala-js" % "sbt-scalajs" % "1.18.1")
addSbtPlugin("org.scala-native" % "sbt-scala-native" % "0.4.17")
addSbtPlugin("org.portable-scala" % "sbt-scala-native-crossproject" % "1.3.2")
addSbtPlugin("ch.epfl.scala" % "sbt-scalajs-bundler" % "0.21.1")
addSbtPlugin("io.github.sbt-doctest" % "sbt-doctest" % "0.11.0")
addSbtPlugin("org.scalameta" % "sbt-mdoc" % "2.6.1")
addSbtPlugin("io.github.sbt-doctest" % "sbt-doctest" % "0.11.1")
addSbtPlugin("org.scalameta" % "sbt-mdoc" % "2.6.2")

libraryDependencySchemes += "com.lihaoyi" %% "geny" % VersionScheme.Always
24 changes: 12 additions & 12 deletions shared/src/main/scala-2/Literals.scala
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ object Literals {
case None => Left("invalid IP address")
}
}
def make(c: Context)(args: c.Expr[Any]*): c.Expr[IpAddress] = apply(c)(args: _*)
def make(c: Context)(args: c.Expr[Any]*): c.Expr[IpAddress] = apply(c)(args*)
}

object ipv4 extends Literally[Ipv4Address] {
Expand All @@ -40,7 +40,7 @@ object Literals {
case None => Left("invalid IPv4 address")
}
}
def make(c: Context)(args: c.Expr[Any]*): c.Expr[Ipv4Address] = apply(c)(args: _*)
def make(c: Context)(args: c.Expr[Any]*): c.Expr[Ipv4Address] = apply(c)(args*)
}

object ipv6 extends Literally[Ipv6Address] {
Expand All @@ -51,7 +51,7 @@ object Literals {
case None => Left("invalid IPv6 address")
}
}
def make(c: Context)(args: c.Expr[Any]*): c.Expr[Ipv6Address] = apply(c)(args: _*)
def make(c: Context)(args: c.Expr[Any]*): c.Expr[Ipv6Address] = apply(c)(args*)
}

object mip extends Literally[Multicast[IpAddress]] {
Expand All @@ -62,7 +62,7 @@ object Literals {
case None => Left("invalid IP multicast address")
}
}
def make(c: Context)(args: c.Expr[Any]*): c.Expr[Multicast[IpAddress]] = apply(c)(args: _*)
def make(c: Context)(args: c.Expr[Any]*): c.Expr[Multicast[IpAddress]] = apply(c)(args*)
}

object mipv4 extends Literally[Multicast[Ipv4Address]] {
Expand All @@ -73,7 +73,7 @@ object Literals {
case None => Left("invalid IPv4 multicast address")
}
}
def make(c: Context)(args: c.Expr[Any]*): c.Expr[Multicast[Ipv4Address]] = apply(c)(args: _*)
def make(c: Context)(args: c.Expr[Any]*): c.Expr[Multicast[Ipv4Address]] = apply(c)(args*)
}

object mipv6 extends Literally[Multicast[Ipv6Address]] {
Expand All @@ -84,7 +84,7 @@ object Literals {
case None => Left("invalid IPv6 multicast address")
}
}
def make(c: Context)(args: c.Expr[Any]*): c.Expr[Multicast[Ipv6Address]] = apply(c)(args: _*)
def make(c: Context)(args: c.Expr[Any]*): c.Expr[Multicast[Ipv6Address]] = apply(c)(args*)
}

object ssmip extends Literally[SourceSpecificMulticast.Strict[IpAddress]] {
Expand All @@ -96,7 +96,7 @@ object Literals {
case None => Left("invalid source specific IP multicast address")
}
}
def make(c: Context)(args: c.Expr[Any]*): c.Expr[SourceSpecificMulticast.Strict[IpAddress]] = apply(c)(args: _*)
def make(c: Context)(args: c.Expr[Any]*): c.Expr[SourceSpecificMulticast.Strict[IpAddress]] = apply(c)(args*)
}

object ssmipv4 extends Literally[SourceSpecificMulticast.Strict[Ipv4Address]] {
Expand All @@ -108,7 +108,7 @@ object Literals {
case None => Left("invalid source specific IPv4 multicast address")
}
}
def make(c: Context)(args: c.Expr[Any]*): c.Expr[SourceSpecificMulticast.Strict[Ipv4Address]] = apply(c)(args: _*)
def make(c: Context)(args: c.Expr[Any]*): c.Expr[SourceSpecificMulticast.Strict[Ipv4Address]] = apply(c)(args*)
}

object ssmipv6 extends Literally[SourceSpecificMulticast.Strict[Ipv6Address]] {
Expand All @@ -120,7 +120,7 @@ object Literals {
case None => Left("invalid source specific IPv6 multicast address")
}
}
def make(c: Context)(args: c.Expr[Any]*): c.Expr[SourceSpecificMulticast.Strict[Ipv6Address]] = apply(c)(args: _*)
def make(c: Context)(args: c.Expr[Any]*): c.Expr[SourceSpecificMulticast.Strict[Ipv6Address]] = apply(c)(args*)
}

object port extends Literally[Port] {
Expand All @@ -131,7 +131,7 @@ object Literals {
case None => Left("invalid port")
}
}
def make(c: Context)(args: c.Expr[Any]*): c.Expr[Port] = apply(c)(args: _*)
def make(c: Context)(args: c.Expr[Any]*): c.Expr[Port] = apply(c)(args*)
}

object hostname extends Literally[Hostname] {
Expand All @@ -142,7 +142,7 @@ object Literals {
case None => Left("invalid hostname")
}
}
def make(c: Context)(args: c.Expr[Any]*): c.Expr[Hostname] = apply(c)(args: _*)
def make(c: Context)(args: c.Expr[Any]*): c.Expr[Hostname] = apply(c)(args*)
}

object idn extends Literally[IDN] {
Expand All @@ -153,6 +153,6 @@ object Literals {
case None => Left("invalid IDN")
}
}
def make(c: Context)(args: c.Expr[Any]*): c.Expr[IDN] = apply(c)(args: _*)
def make(c: Context)(args: c.Expr[Any]*): c.Expr[IDN] = apply(c)(args*)
}
}
6 changes: 3 additions & 3 deletions shared/src/main/scala/com/comcast/ip4s/Cidr.scala
Original file line number Diff line number Diff line change
Expand Up @@ -128,10 +128,10 @@ sealed class Cidr[+A <: IpAddress] protected (val address: A, val prefixBits: In
override def hashCode: Int = MurmurHash3.productHash(this, productPrefix.hashCode)
override def equals(other: Any): Boolean =
other match {
case that: Cidr[_] => address == that.address && prefixBits == that.prefixBits
case that: Cidr[?] => address == that.address && prefixBits == that.prefixBits
case _ => false
}
override def canEqual(other: Any): Boolean = other.isInstanceOf[Cidr[_]]
override def canEqual(other: Any): Boolean = other.isInstanceOf[Cidr[?]]
override def productArity: Int = 2
override def productElement(n: Int): Any =
n match {
Expand All @@ -155,7 +155,7 @@ object Cidr {

object Strict {
def apply[A <: IpAddress](cidr: Cidr[A]): Cidr.Strict[A] = cidr match {
case already: Strict[_] => already.asInstanceOf[Strict[A]]
case already: Strict[?] => already.asInstanceOf[Strict[A]]
case _ => new Cidr.Strict(cidr.prefix, cidr.prefixBits)
}
}
Expand Down
4 changes: 2 additions & 2 deletions shared/src/main/scala/com/comcast/ip4s/Multicast.scala
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ object Multicast {
private case class DefaultMulticast[+A <: IpAddress](address: A) extends Multicast[A] {
override def toString: String = address.toString
override def equals(that: Any): Boolean = that match {
case m: Multicast[_] => address == m.address
case m: Multicast[?] => address == m.address
case _ => false
}
override def hashCode: Int = address.hashCode
Expand Down Expand Up @@ -72,7 +72,7 @@ object SourceSpecificMulticast {
private case class DefaultSourceSpecificMulticast[+A <: IpAddress](address: A) extends SourceSpecificMulticast[A] {
override def toString: String = address.toString
override def equals(that: Any): Boolean = that match {
case m: Multicast[_] => address == m.address
case m: Multicast[?] => address == m.address
case _ => false
}
override def hashCode: Int = address.hashCode
Expand Down

0 comments on commit 6156b56

Please sign in to comment.