Skip to content

Commit 4e4875a

Browse files
committed
Rectified code to handle scala/scala3#20149
1 parent 889dd2a commit 4e4875a

File tree

4 files changed

+8
-7
lines changed

4 files changed

+8
-7
lines changed

build.sbt

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
val scala3Version = "3.3.3"
1+
val scala3Version = "3.5.0"
22

33
scalacOptions ++= Seq("-feature", "-deprecation", "-language:implicitConversions", "-Wunused:all")
44

@@ -7,14 +7,14 @@ lazy val dataMapping = project
77
.settings(
88
name := "data-mapping",
99
organization := "com.greenfossil",
10-
version := "1.0.23",
10+
version := "1.1.0-RC1",
1111

1212
scalaVersion := scala3Version,
1313

1414
Compile / javacOptions ++= Seq("-source", "17"),
1515

1616
libraryDependencies ++= Seq(
17-
"com.greenfossil" %% "commons-json" % "1.0.17",
17+
"com.greenfossil" %% "commons-json" % "1.1.0-RC1",
1818
"com.typesafe" % "config" % "1.4.3",
1919
"org.slf4j" % "slf4j-api" % "2.0.12",
2020
"ch.qos.logback" % "logback-classic" % "1.5.6" % Test,

src/main/scala/com/greenfossil/data/mapping/Mapping.scala

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,6 @@
1717
package com.greenfossil.data.mapping
1818

1919
import com.greenfossil.commons.json.JsValue
20-
import com.greenfossil.data.mapping.Binder.*
2120
import org.slf4j.LoggerFactory
2221

2322
private[mapping] val mappingLogger = LoggerFactory.getLogger("data-mapping")

src/main/scala/com/greenfossil/data/mapping/ProductMapping.scala

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -127,7 +127,9 @@ case class ProductMapping[A](tpe: String,
127127
val fieldsErrors: List[MappingError] = newMappings.toList.collect { case f: Mapping[t] => f.errors }.flatten
128128

129129
val boundFieldValues: Any *: Tuple =
130-
newMappings.map[[A] =>> Any] {
130+
//FIXED https://github.com/scala/scala3/issues/20149
131+
val newMappings1: Mapping[?] *: Tuple = newMappings
132+
newMappings1.map[[A] =>> Any] {
131133
[X] => (x: X) => x match
132134
case f: Mapping[t] => safeValue(f.typedValueOpt)
133135
}

src/main/scala/com/greenfossil/data/mapping/ValidationResult.scala

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -63,7 +63,7 @@ object Invalid:
6363
* @param args the validation error message arguments
6464
* @return an `Invalid` value
6565
*/
66-
def apply(error: String, args: Any*): Invalid = Invalid(Seq(ValidationError(error, args: _*)))
66+
def apply(error: String, args: Any*): Invalid = Invalid(Seq(ValidationError(error, args*)))
6767

6868
end Invalid
6969

@@ -82,7 +82,7 @@ end ValidationError
8282

8383
object ValidationError:
8484

85-
def apply(message: String, args: Any*) = new ValidationError(Seq(message), args: _*)
85+
def apply(message: String, args: Any*) = new ValidationError(Seq(message), args*)
8686

8787
end ValidationError
8888

0 commit comments

Comments
 (0)