Skip to content

Commit

Permalink
fix: ensure discover macro is in the same file
Browse files Browse the repository at this point in the history
closes #96
  • Loading branch information
ckipp01 committed Jun 4, 2023
1 parent 1464f8b commit 2132b48
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,4 @@ import mill.main.EvaluatorScopt
private[graph] object Discover {
implicit def millScoptEvaluatorReads[A]: EvaluatorScopt[A] =
new EvaluatorScopt[A]()

def apply[T] = mill.define.Discover[T]
}
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
package io.kipp.mill.github.dependency.graph

private[graph] object Discover {
def apply[T] = mill.define.Discover[T]
implicit def millEvaluatorTokenReader =
mill.main.TokenReaders.millEvaluatorTokenReader
}
8 changes: 7 additions & 1 deletion plugin/src/io/kipp/mill/github/dependency/graph/Graph.scala
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,10 @@ import mill.define.Command
import mill.define.ExternalModule
import mill.eval.Evaluator

import scala.annotation.nowarn

// In here for the Discover import
@nowarn("msg=Unused import")
object Graph extends ExternalModule {

import Writers._
Expand All @@ -26,5 +30,7 @@ object Graph extends ExternalModule {
manifests
}

lazy val millDiscover: mill.define.Discover[this.type] = Discover[this.type]
import Discover._
lazy val millDiscover: mill.define.Discover[this.type] =
mill.define.Discover[this.type]
}

0 comments on commit 2132b48

Please sign in to comment.