mill
mill copied to clipboard
[RFC] Create a module that can compile and run Ammonite and scala-cli scripts
This related to https://github.com/com-lihaoyi/Ammonite/issues/1228, which is worth a full read to understand the motivation
We need a module, that can
- read an Ammonite or scala-cli script,
- inspect it's magic imports,
- collects all included files (when Ammonite script),
- resolved it's dependencies (in one go),
- compiles all files,
- and provided a way to run the script
- as Ammonite script
- as Mill script
- as scala-cli script
Once this is ready, we can stop using Ammonite for all of these tasks and can use this module to provide better BSP support.
Seems like a good idea. The less magic, the better.
It might be worth to evaluate, if we can adapt the using directive (https://scala-cli.virtuslab.org/docs/guides/configuration#in-scala-and-sc-files) from Scala-cli for Mill build scripts. It seems to be much easier to parse them from Mill.
- #2377
- #2414