mill icon indicating copy to clipboard operation
mill copied to clipboard

Embed all worker jars needed to compile a `build.mill`.

Open lefou opened this issue 2 years ago • 4 comments

Since Mill 0.11, even for compilation of the build.sc a full ScalaModule and a ZincWorkerModule need to be instantiated. Those are dynamically loaded from a coursier cache and need to be downloaded when not already present. That means, on systems without or with restricted internet access, running a Mill project may fail.

I suggest, that we embed the required worker jars in our mill assembly as resources, so that we are at least able to bootstrap a Mill project to a point where minimal inspection tasks work.

lefou avatar Jul 28 '23 09:07 lefou

Going to call this a wontfix since https://github.com/com-lihaoyi/mill/pull/4879 goes in the opposite direction to make everything get resolved by coursier

lihaoyi avatar Apr 29 '25 07:04 lihaoyi

The idea behind this issue was that we, once we have a --offline option, or are technically offline, we are not able to build a build.mill when not all dependencies are already pre-fetched into the courier repository. We clearly know which exact dependencies we need to build a basic build.mill, so we could come with the required jars as embedded resources and either unpack them into the coursier repository or instantiate some ad-hoc repository that provides these dependencies.

lefou avatar Apr 29 '25 07:04 lefou

This is meant as an optional feature though. We either have a embedded repository and it has the required jars, or we don't. It is meant as an fallback or a way to faster build a local project without the need to download anything.

lefou avatar Apr 29 '25 07:04 lefou

Got it, reopening this then

lihaoyi avatar Apr 29 '25 09:04 lihaoyi