mill icon indicating copy to clipboard operation
mill copied to clipboard

Undercompilation of `MillConfigParser.parser` after change in `MillConfig`

Open lefou opened this issue 2 years ago • 1 comments

This is probably not an issue in Mill, but in either Zinc or mainargs.

After a clean build when changing the @arg.doc attribute of one argument in mill.MillConfig, a recompile results in only on recompiled file MillConfig.scala. The file MillConfigParser.scala gets not recompiled, yet it contains a lazy val usageText = parser.helpText() (parser is a private[this] lazy val parser: ParserForClass[MillConfig] = mainargs.ParserForClass[MillConfig]), which needs to re-evaluate once the annotated config class changes.

This results in outdate/stale help messages.

Here is a reprodcution: https://github.com/lefou/mainargs-undercompilation-reproduction

lefou avatar Feb 14 '23 13:02 lefou

  • See https://github.com/sbt/zinc/issues/1171

lefou avatar Feb 14 '23 14:02 lefou

Let's close this, since it's a zinc/macro problem that applies to all macros, and there's really not much can do on the Mill side of things

lihaoyi avatar Jul 22 '24 12:07 lihaoyi