Reading (parts of) Mill configuration from a YAML file #5103
Replies: 6 comments 5 replies
-
I hit this need in #5092 as well |
Beta Was this translation helpful? Give feedback.
-
Probably won't do this for 1.0.0, but we can experiment with it and add it in a backwards compatible way later on |
Beta Was this translation helpful? Give feedback.
-
To experiment with it, a special meta-build could be used that reads the yaml file and does the (ideally automatic) mapping. |
Beta Was this translation helpful? Give feedback.
-
How do you express |
Beta Was this translation helpful? Give feedback.
-
I should also add that this could have some significant downsides. If Mill adopted this, it would suddenly shutter the configuration between two very different places. The normal Scala file and the new YAML file. Users would have to wonder where the configuration is coming from. Is it coming from YAML or Scala? Where should I look? Also, the same module could have some fields coming from YAML, some from Scala. So this approach does have also some UX downsides... |
Beta Was this translation helpful? Give feedback.
-
Some sort of compromise solution would require more opt-in from the side of the user, like having to extend a trait object foo extends ScalaModule with PopulateFromYaml {
object test extends ScalaTests {
def ivyDeps = Agg(ivy"com.lihaoyi::utest:0.8.5")
def testFramework = "utest.runner.Framework"
}
} foo:
scalaVersion: 2.13.11
mvnDeps:
- com.lihaoyi::scalatags:0.13.1
- com.lihaoyi::mainargs:0.6.2 |
Beta Was this translation helpful? Give feedback.
-
The draft of Release Notes for 1.0.0-RC1 reads
That begs the question: can I configure some parts of my ordinary, non-meta, build also using YAML?
It could be nice to be able to specify some trivial things that don't require the full power of Scala as simple fields in a YAML file, like
mill.yaml
:with
build.mill
being mereBeta Was this translation helpful? Give feedback.
All reactions