Differentiate between a compile JVM and a run JVM - add a `forkJvmId` and `forkJavaHome`?
Currently, the JavaHomeModule.javaHome, which is derived from jvmId is used in different situations, but most often for compilation and running. I'd like to use a different JVM for running a module than was used for compiling a module, which is currently not possible.
To avoid repetition by adding a forkJvmId and forkJavaHome (and other intermediate internal task like forkJvmIndexVersion), the Mill-idiomatic way would be to have separate module references like compileJvm: ModuleRef[JavaHomeModule] and forkJvm: ModuleRef[JavaHomeModule].
On the other hand, this is almost what we had before https://github.com/com-lihaoyi/mill/pull/5327. So, I'd like to have a discussion, what a good compromise between clean setup and convenience could look like.
Seems like instantiating a nested RunModule that depends on the parent but has different run configuration would be the most straightforward way right now?
Sounds doable, except a bit tedious for the typical cases where I met this requirement: tests.
While test is already a nested RunModule, the runtime-JVM is still shared with the compiletime-JVM, so the resulting setup to run tests isn't only not intuitive, it's also open to be used wrong, as there is still a testForked task which is configured plain wrong.