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

Don't loose moduleDeps from super traits in PublishModule #2083

Merged
merged 4 commits into from
Oct 24, 2022
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 11 additions & 1 deletion scalalib/src/PublishModule.scala
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,17 @@ import mill.scalalib.publish.{Artifact, VersionScheme, SonatypePublisher}
trait PublishModule extends JavaModule { outer =>
import mill.scalalib.publish._

override def moduleDeps: Seq[PublishModule] = Seq.empty[PublishModule]
private class Error(msg: String) extends scala.util.control.NoStackTrace {
override def getMessage() = msg
}

override def moduleDeps: Seq[PublishModule] = super.moduleDeps.map {
case m: PublishModule => m
case other =>
throw new Error(
s"PublishModule moduleDeps need to be also PublishModules. $other is not a PublishModule"
)
}

def pomSettings: T[PomSettings]
def publishVersion: T[String]
Expand Down