Skip to content

Commit

Permalink
Add ReadWriters for CheckDirection (#57)
Browse files Browse the repository at this point in the history
  • Loading branch information
lolgab authored Jul 25, 2022
1 parent 98a306e commit d04cf37
Show file tree
Hide file tree
Showing 3 changed files with 11 additions and 3 deletions.
6 changes: 3 additions & 3 deletions build.sc
Original file line number Diff line number Diff line change
Expand Up @@ -81,9 +81,9 @@ object `mill-mima-worker-impl` extends Common {
object itest
extends Cross[itestCross](
"0.9.7",
"0.9.8",
"0.9.11",
"0.10.0"
"0.9.12",
"0.10.0",
"0.10.5"
)
class itestCross(millVersion: String) extends MillIntegrationTestModule {
override def millSourcePath: Path = super.millSourcePath / os.up
Expand Down
1 change: 1 addition & 0 deletions itest/src/simple/build.sc
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@ trait Common extends ScalaModule with PublishModule {
object prev extends Common
object curr extends Common with Mima {
override def mimaPreviousArtifacts = T(Agg(ivy"org::prev:0.0.1"))
override def mimaCheckDirection = CheckDirection.Backward
}

def prepare() = T.command {
Expand Down
Original file line number Diff line number Diff line change
@@ -1,8 +1,15 @@
package com.github.lolgab.mill.mima

import upickle.default._

sealed trait CheckDirection
object CheckDirection {
case object Backward extends CheckDirection
case object Forward extends CheckDirection
case object Both extends CheckDirection

implicit val backwardRW: ReadWriter[CheckDirection.Backward.type] = macroRW
implicit val bothRW: ReadWriter[CheckDirection.Both.type] = macroRW
implicit val forwardRW: ReadWriter[CheckDirection.Forward.type] = macroRW
implicit val checkDirectionRW: ReadWriter[CheckDirection] = macroRW
}

0 comments on commit d04cf37

Please sign in to comment.