Replies: 8 comments 2 replies
-
Can you show a snippet of your target and the full error message. |
Beta Was this translation helpful? Give feedback.
-
Weird that def publishAll(
scalaVersion: String,
sonatypeCreds: String,
release: Boolean
): Command[Unit] =
T.command {
mainModule
.millInternal
.modules
.collect {
case m: PublishModule with Base =>
m
}
.filter(_.scalaVersionShort() == scalaVersion)
.foreach { m =>
m.publish(sonatypeCreds, release = release, stagingRelease = false)
}
}
class Base extends extends ScalaModule with PublishModule {
//.....
override def scalaVersion: T[String] = T { scalaVersionLong }
}
|
Beta Was this translation helpful? Give feedback.
-
Sorry, I still don't understand. I can't see the definition of |
Beta Was this translation helpful? Give feedback.
-
Maybe your are looking for one of the combinators |
Beta Was this translation helpful? Give feedback.
-
def publishAll(
scalaVersion: String,
sonatypeCreds: String,
release: Boolean
): Command[Unit] =
T.command {
mainModule
.millInternal
.modules
.collect {
case m: PublishModule with Base =>
m
}
.filter(_.scalaVersion() == scalaVersion)
.foreach { m =>
m.publish(sonatypeCreds, release = release, stagingRelease = false)
}
}
class Base(_scalaVersionShort: String) extends ScalaModule with PublishModule {
// val _scalaVersionShort: String = ???
override def scalaVersion: T[String] = T { _scalaVersionShort }
} result:
I then created a different version with a non Why is the call to |
Beta Was this translation helpful? Give feedback.
-
It's probably because you are never executing the resulting |
Beta Was this translation helpful? Give feedback.
-
Ah ok so both tasks Some chapter about working around And I have to use a combination of T.zip, T.traverse or T.sequence instead to ship around the macro limitations? |
Beta Was this translation helpful? Give feedback.
-
How could I compose existing commands and tasks etc into a new command In this example? |
Beta Was this translation helpful? Give feedback.
-
"Target#apply() call cannot use
" + banned0.symbol + "
defined within the T{...} block"How am i supposed to work around this?
I want to compose several command calls into one command.
Some wiki entry describing this or a better error message would really help.
Beta Was this translation helpful? Give feedback.
All reactions