Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fixed building scalatests on scala-native-2.13 #1922

Open
wants to merge 1 commit into
base: 3.2.x-new
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
6 changes: 6 additions & 0 deletions project/GenScalaTestNative.scala
Expand Up @@ -116,10 +116,16 @@ object GenScalaTestNative {
val genScalaPackages: Map[String, List[String]] =
Map(
"org/scalatest" -> (List(
"Doc.scala",
"DocSpec.scala",
"DocSpecLike.scala",
"DispatchReporter.scala",
"ConfigMapWrapperSuite.scala", // skipped because depends on java reflection.
"JavaClassesWrappers.scala",
"Shell.scala",
"StreamlinedXml.scala",
"StreamlinedXmlEquality.scala",
"StreamlinedXmlNormMethods.scala",
"SuiteRerunner.scala",
"SuiteRerunner.scala",
"run.scala"
Expand Down
14 changes: 0 additions & 14 deletions project/NativeBuild.scala
Expand Up @@ -16,18 +16,6 @@ trait NativeBuild { this: BuildCommons =>

val scalaNativeVersion = Option(System.getenv("SCALANATIVE_VERSION")).getOrElse("0.4.0-M2")

lazy val nativeCrossBuildLibraryDependencies = Def.setting {
CrossVersion.partialVersion(scalaVersion.value) match {
// if scala 2.11+ is used, add dependency on scala-xml module
case Some((2, scalaMajor)) if scalaMajor >= 11 =>
Seq(
"org.scala-lang.modules" %% "scala-xml" % "1.0.6"
)
case _ =>
Seq.empty
}
}

private lazy val sharedNativeSettings = Seq(
// This hack calls class directory as "resource" that forces to add all NIRs that was generated
// by scala-native for classes that has `EnableReflectiveInstantiation` annotation
Expand Down Expand Up @@ -166,7 +154,6 @@ trait NativeBuild { this: BuildCommons =>
name := "scalatest-app",
organization := "org.scalatest",
moduleName := "scalatest-app",
libraryDependencies ++= nativeCrossBuildLibraryDependencies.value,
libraryDependencies += "org.scala-native" %%% "test-interface" % scalaNativeVersion,
// include the scalactic classes and resources in the jar
mappings in (Compile, packageBin) ++= mappings.in(scalacticNative, Compile, packageBin).value,
Expand Down Expand Up @@ -714,7 +701,6 @@ trait NativeBuild { this: BuildCommons =>
def sharedTestSettingsNative: Seq[Setting[_]] =
Seq(
organization := "org.scalatest",
libraryDependencies ++= nativeCrossBuildLibraryDependencies.value,
// libraryDependencies += "io.circe" %%% "circe-parser" % "0.7.1" % "test",
fork in test := false,
nativeLinkStubs in Test := true,
Expand Down