scala-cli icon indicating copy to clipboard operation
scala-cli copied to clipboard

Bring `Mill` export up-to-date and support Mill. 1.0.x

Open lefou opened this issue 3 months ago • 2 comments

I can't tell, if it's just the documentation or the whole feature, but the shown generated Mill projects looks outdated.

The page: https://scala-cli.virtuslab.org/docs/commands/export/

A screenshot:

Image

The following issue are obvious:

  • The file is build.sc, while Mill since version 0.12 defaults to build.mill. Currently Mill 1.0.5 is the latest stable version
  • The object test extends Tests definition was deprecated in Mill 0.12 and will not work for Mill 1.0. Instead it should be object test extends ScalaTests.
  • The explicit addition of the dependency os-lib in the test module seems redundant, since it is already defined in the main project and the test module depends on the main module, so it will be resolved transitively
  • The mentioned bootstrap script millw from the linked project lefou/millw is archived. The script is now part of Mill itself.
  • While the generated .mill-version file still works, using a //| mill-version: 1.0.5 YAML header in the build.mill file should be preferred. This also shows the version to the reader of the listing, making it more obvious which Mill version is targetted by the build.mill.

Generally, the shown examples should mention the used versions, so the pages can age better.

lefou avatar Sep 24 '25 08:09 lefou

It's not just the documentation - the whole Mill export is outdated. We do produce a working build with build.sc syntax for Mill up to 0.12.15 atm, but that's that. The feature would need quite a bit of love to support 1.0.

Gedochao avatar Sep 24 '25 09:09 Gedochao

For more context - I consider finishing the upgrade of our build in https://github.com/VirtusLab/scala-cli/pull/3857 as the first step towards this. I do not think we will improve the export before the Scala CLI build itself is brough to 1.0.5+

Gedochao avatar Sep 24 '25 09:09 Gedochao