mill icon indicating copy to clipboard operation
mill copied to clipboard

[RFC] Create a module that can compile and run Ammonite and scala-cli scripts

Open lefou opened this issue 3 years ago • 3 comments

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.

lefou avatar Jan 13 '22 12:01 lefou

Seems like a good idea. The less magic, the better.

hilcode avatar Jul 14 '22 15:07 hilcode

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.

lefou avatar Jul 15 '22 09:07 lefou

  • #2377
  • #2414

lefou avatar May 02 '23 21:05 lefou