-
Notifications
You must be signed in to change notification settings - Fork 43
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
ScalafixTestkitPlugin improvements #220
Conversation
@@ -38,40 +38,41 @@ lazy val tests = projectMatrix | |||
.settings( | |||
libraryDependencies += "ch.epfl.scala" % "scalafix-testkit" % V.scalafixVersion % Test cross CrossVersion.full, | |||
scalafixTestkitOutputSourceDirectories := | |||
resolveByInputAxis(output, Compile / unmanagedSourceDirectories).value, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@@ -13,38 +13,42 @@ object ScalafixTestkitPlugin extends AutoPlugin { | |||
override def requires: Plugins = JvmPlugin | |||
|
|||
object autoImport { | |||
case class InputAxis(scalaVersion: String) extends VirtualAxis.WeakAxis { | |||
case class TestkitTargetAxis(scalaVersion: String) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Not very happy about that name either... I also considered Sources
, Fixtures
and Data
. Suggestions welcome!
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It's already better! Don't have better propositions
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
val project = matrix.finder().apply(sv) | ||
Def.task((project / key).value) | ||
} | ||
private def targetScalaVersion(virtualAxes: Seq[VirtualAxis]): String = |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I don't completely get why we take the first scalaVersion that we find, and use it the resolve task
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
why we take the first scalaVersion that we find
because there can be only one value per axis per project
use it the resolve task
we lookup the corresponding input/output project based on this value, that's where I am not too satisfied with the Target
naming: it's about tagging in tests*
which input*
or output*
it should run against.
@@ -13,38 +13,42 @@ object ScalafixTestkitPlugin extends AutoPlugin { | |||
override def requires: Plugins = JvmPlugin | |||
|
|||
object autoImport { | |||
case class InputAxis(scalaVersion: String) extends VirtualAxis.WeakAxis { | |||
case class TestkitTargetAxis(scalaVersion: String) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It's already better! Don't have better propositions
Follows #219