Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[RFC] Create a module that can compile and run Ammonite scripts and use it for Mill itself #1675

Closed
lefou opened this issue Jan 13, 2022 · 4 comments
Labels
feedback wanted Additional feedback or testing is apreciated
Milestone

Comments

@lefou
Copy link
Member

lefou commented Jan 13, 2022

This related to com-lihaoyi/Ammonite#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 lefou changed the title [RFC] Create a module that can compile and run Ammonite scripts [RFC] Create a module that can compile and run Ammonite and scala-cli scripts Jan 13, 2022
@lefou lefou added the feedback wanted Additional feedback or testing is apreciated label Jan 13, 2022
@hilcode
Copy link

hilcode commented Jul 14, 2022

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

@lefou
Copy link
Member Author

lefou commented Jul 15, 2022

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 lefou changed the title [RFC] Create a module that can compile and run Ammonite and scala-cli scripts [RFC] Create a module that can compile and run Ammonite scripts and use it for Mill itself Dec 5, 2024
@lefou
Copy link
Member Author

lefou commented Dec 5, 2024

Closing as completed. Although Mill build scripts are no longer Ammonite scripts since then, we build Mill scripts now with a MillBuildModule.

@lefou lefou closed this as completed Dec 5, 2024
@lefou lefou added this to the 0.11.0 milestone Dec 5, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
feedback wanted Additional feedback or testing is apreciated
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants