This is an automated email from the ASF dual-hosted git repository.
olabusayo pushed a commit to branch main
in repository https://gitbox.apache.org/repos/asf/daffodil.git
The following commit(s) were added to refs/heads/main by this push:
new 56e717373 Update macroLib scala-reflect dependency for only scala 2.13
56e717373 is described below
commit 56e717373ffba4edeef50517ed4b07445845b59c
Author: olabusayoT <[email protected]>
AuthorDate: Tue Jul 29 14:35:41 2025 -0400
Update macroLib scala-reflect dependency for only scala 2.13
- remove argument from common, revert to lazy val
DAFFODIL-3018
---
build.sbt | 11 +++++++++--
project/Dependencies.scala | 7 +------
2 files changed, 10 insertions(+), 8 deletions(-)
diff --git a/build.sbt b/build.sbt
index 0a85e02ae..4dde80d35 100644
--- a/build.sbt
+++ b/build.sbt
@@ -58,7 +58,14 @@ lazy val daffodil = project
lazy val macroLib = Project("daffodil-macro-lib", file("daffodil-macro-lib"))
.settings(commonSettings, nopublish)
- .settings(libraryDependencies += "org.scala-lang" % "scala-reflect" %
"2.13.16")
+ .settings({
+ libraryDependencies ++= {
+ CrossVersion.partialVersion(scalaVersion.value) match {
+ case Some((2, _)) => Seq("org.scala-lang" % "scala-reflect" %
scalaVersion.value)
+ case _ => Seq.empty
+ }
+ }
+ })
.disablePlugins(OsgiCheckPlugin)
lazy val propgen = Project("daffodil-propgen", file("daffodil-propgen"))
@@ -217,7 +224,7 @@ lazy val commonSettings = Seq(
unmanagedBase := baseDirectory.value / "lib" / "jars",
sourceManaged := baseDirectory.value / "src_managed",
resourceManaged := baseDirectory.value / "resource_managed",
- libraryDependencies ++= Dependencies.common(scalaVersion.value),
+ libraryDependencies ++= Dependencies.common,
testOptions += Tests.Argument(TestFrameworks.JUnit, "-q", "--verbosity=1"),
Compile / packageDoc / publishArtifact := false
)
diff --git a/project/Dependencies.scala b/project/Dependencies.scala
index 002729aec..f7ba8af8d 100644
--- a/project/Dependencies.scala
+++ b/project/Dependencies.scala
@@ -19,12 +19,7 @@ import sbt._
object Dependencies {
- def common(scalaVersion: String) = core ++ infoset ++ test ++ {
- CrossVersion.partialVersion(scalaVersion) match {
- case Some((2, 13)) => Seq("org.scala-lang" % "scala-reflect" % "2.13.16")
- case _ => Seq.empty
- }
- }
+ lazy val common = core ++ infoset ++ test
lazy val core = Seq(
"com.lihaoyi" %% "os-lib" % "0.11.4", // for writing/compiling C source
files