Sharing sources between meta build and a custom plugin is not working. #4413
-
I am trying to share sources between a custom plugin I am developing and the metabuild for the mill repo in which I am developing the plugin, but something is not working as expected: When I add this to my: package build
import mill._
import mill.scalalib._
object `package` extends MillBuildRootModule with ScalaModule {
override def sources = Task.Sources {
super.sources() ++ Seq(PathRef(T.workspace / os.up / "my-mill-plugins"/"src"))
}
} If I run ❯ ./mill --meta-level 1 showNamed __.sources
{
"sources": [
"ref:v0:8d3598a5:/Users/redacted/code/repos/github/internal/scala/my-mill-plugins/build.mill",
"ref:v0:f9a4b8b9:/Users/redactedcode/repos/github/internal/scala/my-mill-plugins/mill-build/src",
"ref:v0:c984eca8:/Users/redacted/code/repos/github/internal/scala/my-mill-plugins/src"
]
} And if I run ❯ ./mill showNamed "my-mill-plugins.allSourceFiles"
[1/1] showNamed
{
"my-mill-plugins.allSourceFiles": [
"ref:v0:05bdafe7:/Users/redacted/code/repos/github/internal/scala/my-mill-plugins/my-mill-plugins/src/com/acme/mill/plugins/artifactory/MavenUtils.scala",
"ref:v0:c45089c5:/Users/redacted/code/repos/github/internal/scala/my-mill-plugins/my-mill-plugins/src/com/acme/mill/plugins/artifactory/BuildPipelineArtifactory.scala"
]
} But if I run: I get the below which doesn't include the source files from within the folder I added. ❯ ./mill --meta-level 1 showNamed __.allSourceFiles
{
"allSourceFiles": [
"ref:v0:f0ff61d1:/Users/redacted/code/repos/github/internal/scala/my-mill-plugins/out/mill-build/generateScriptSources.dest/build_/build.mill"
]
} |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment
-
Oops my mistake, it turns out the package build
import mill._
import mill.scalalib._
object `package` extends MillBuildRootModule with ScalaModule {
override def sources = Task.Sources {
super.sources() ++ Seq(PathRef(T.workspace / "my-mill-plugins"/"src"))
}
} |
Beta Was this translation helpful? Give feedback.
Oops my mistake, it turns out the
os.up
was not needed like I thought, this works: