Scala 3 cross compatible akka-actor / akka-testkit / akka-actor-tests (#29956)

* Remove @switch when it doesn't take effect
* Use ActorRef.noSender
* Minor tweaks to SchedulerSpec
* Disambiguate TypedActor for Scala 3
* Bump ScalaTest to a version compatible with Scala 3
* Bump ScalaCheck
* Disambiguate Event in SupervisorHierarchySpec
* Scala 3 compatible EventBusSpec
* Prevent private unused variables to be erased by Scala 3
* Bump mockito
* Explicit actorRef2Scala import
* restore original .scalafix.conf
* Scala 3 compatible tailrec
* Reminder to re add switch annotation in case
* Move to nowarn instead of silencer
* Bump to Scala 2.12.13
* Cross compatible annotations
* fix docs generation
* adapt the build for Scala 3
* fix errors but bus
* remove more SerialVersion from trait
* scalacheck only from scalatest
* cross-compile akka-actor-tests
* restore cross-compilation
* early initializers workaround
* scalacheck switch
* cross compatible FSM.State class
* cross compatible LARS spec
* Change results to pass LineNumberSpec
* fix stackoverflow in AsyncDnsResolverIntegrationSpec
* FSM.State unapply
* fix Scala 2.13 mima
* SerialVersionRemover compiler plugin
* removed unused nowarns
This commit is contained in:
Andrea Peruffo 2021-02-01 15:38:29 +00:00 committed by GitHub
parent 0f27ed6189
commit da70e0ccd4
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
370 changed files with 4058 additions and 1373 deletions

View file

@ -25,52 +25,45 @@ object AkkaValidatePullRequest extends AutoPlugin {
override def trigger = allRequirements
override def requires = ValidatePullRequest
val ValidatePR = config("pr-validation") extend Test
val ValidatePR = config("pr-validation").extend(Test)
override lazy val projectConfigurations = Seq(ValidatePR)
val additionalTasks = settingKey[Seq[TaskKey[_]]]("Additional tasks for pull request validation")
override lazy val globalSettings = Seq(
credentials ++= {
// todo this should probably be supplied properly
GitHub.envTokenOrThrow.map { token =>
Credentials("GitHub API", "api.github.com", "", token)
}
},
additionalTasks := Seq.empty
)
override lazy val globalSettings = Seq(credentials ++= {
// todo this should probably be supplied properly
GitHub.envTokenOrThrow.map { token =>
Credentials("GitHub API", "api.github.com", "", token)
}
}, additionalTasks := Seq.empty)
override lazy val buildSettings = Seq(
validatePullRequest / includeFilter := PathGlobFilter("akka-*/**"),
validatePullRequestBuildAll / excludeFilter := PathGlobFilter("project/MiMa.scala"),
prValidatorGithubRepository := Some("akka/akka")
)
prValidatorGithubRepository := Some("akka/akka"))
override lazy val projectSettings = inConfig(ValidatePR)(Defaults.testTasks) ++ Seq(
testOptions in ValidatePR += Tests.Argument(TestFrameworks.ScalaTest, "-l", "performance"),
testOptions in ValidatePR += Tests.Argument(TestFrameworks.ScalaTest, "-l", "long-running"),
testOptions in ValidatePR += Tests.Argument(TestFrameworks.ScalaTest, "-l", "timing"),
// make it fork just like regular test running
fork in ValidatePR := (fork in Test).value,
testGrouping in ValidatePR := (testGrouping in Test).value,
javaOptions in ValidatePR := (javaOptions in Test).value,
prValidatorTasks := Seq(test in ValidatePR) ++ additionalTasks.value,
prValidatorEnforcedBuildAllTasks := Seq(test in Test) ++ additionalTasks.value
)
testOptions in ValidatePR += Tests.Argument(TestFrameworks.ScalaTest, "-l", "performance"),
testOptions in ValidatePR += Tests.Argument(TestFrameworks.ScalaTest, "-l", "long-running"),
testOptions in ValidatePR += Tests.Argument(TestFrameworks.ScalaTest, "-l", "timing"),
// make it fork just like regular test running
fork in ValidatePR := (fork in Test).value,
testGrouping in ValidatePR := (testGrouping in Test).value,
javaOptions in ValidatePR := (javaOptions in Test).value,
prValidatorTasks := Seq(test in ValidatePR) ++ additionalTasks.value,
prValidatorEnforcedBuildAllTasks := Seq(test in Test) ++ additionalTasks.value)
}
/**
* This autoplugin adds Multi Jvm tests to validatePullRequest task.
* It is needed, because ValidatePullRequest autoplugin does not depend on MultiNode and
* therefore test:executeTests is not yet modified to include multi-jvm tests when ValidatePullRequest
* build strategy is being determined.
*
* Making ValidatePullRequest depend on MultiNode is impossible, as then ValidatePullRequest
* autoplugin would trigger only on projects which have both of these plugins enabled.
*/
* This autoplugin adds Multi Jvm tests to validatePullRequest task.
* It is needed, because ValidatePullRequest autoplugin does not depend on MultiNode and
* therefore test:executeTests is not yet modified to include multi-jvm tests when ValidatePullRequest
* build strategy is being determined.
*
* Making ValidatePullRequest depend on MultiNode is impossible, as then ValidatePullRequest
* autoplugin would trigger only on projects which have both of these plugins enabled.
*/
object MultiNodeWithPrValidation extends AutoPlugin {
import AkkaValidatePullRequest._
import com.typesafe.sbt.MultiJvmPlugin.MultiJvmKeys.MultiJvm
@ -83,9 +76,9 @@ object MultiNodeWithPrValidation extends AutoPlugin {
}
/**
* This autoplugin adds MiMa binary issue reporting to validatePullRequest task,
* when a project has MimaPlugin autoplugin enabled.
*/
* This autoplugin adds MiMa binary issue reporting to validatePullRequest task,
* when a project has MimaPlugin autoplugin enabled.
*/
object MimaWithPrValidation extends AutoPlugin {
import AkkaValidatePullRequest._
@ -96,24 +89,20 @@ object MimaWithPrValidation extends AutoPlugin {
}
/**
* This autoplugin adds Paradox doc generation to validatePullRequest task,
* when a project has ParadoxPlugin autoplugin enabled.
*/
* This autoplugin adds Paradox doc generation to validatePullRequest task,
* when a project has ParadoxPlugin autoplugin enabled.
*/
object ParadoxWithPrValidation extends AutoPlugin {
import AkkaValidatePullRequest._
override def trigger = allRequirements
override def requires = AkkaValidatePullRequest && ParadoxPlugin
override lazy val projectSettings = Seq(
additionalTasks += paradox in Compile
)
override lazy val projectSettings = Seq(additionalTasks += paradox in Compile)
}
object UnidocWithPrValidation extends AutoPlugin {
import AkkaValidatePullRequest._
override def trigger = noTrigger
override lazy val projectSettings = Seq(
additionalTasks += unidoc in Compile
)
override lazy val projectSettings = Seq(additionalTasks += unidoc in Compile)
}