Skip to content
This repository has been archived by the owner on Jun 6, 2024. It is now read-only.

lefou/mainargs-undercompilation-reproduction

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

3 Commits
 
 
 
 
 
 
 
 

Repository files navigation

Reproduction of untercompilation issue

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 foo.Config, a recompile results in only on recompiled file Config.scala. The file ConfigParser.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]).

The expectation is, that also ConfigParser.scala gets recompiled. This does not happen. This results in outdate/stale help messages.

Reproduction steps
$ mill clean
[1/1] clean
$ mill foo.run --help
[33/46] foo.compile
Compiling compiler interface...
[info] compiling 2 Scala sources to /tmp/mainargs-repro/out/foo/compile.dest/classes ...
[info] done compiling
[46/46] foo.run
apply
  --help  Print this help message.

$ sed -i "s/Print this help message/Print another message/" foo/src/Config.scala
$ mill foo.run --help
[33/46] foo.compile
[info] compiling 1 Scala source to /tmp/mainargs-repro/out/foo/compile.dest/classes ...  (1)
[info] done compiling
[46/46] foo.run
apply
  --help  Print this help message.  (2)
  1. We would expect 2 recompiled files here

  2. We would expect the output: --help Print another message.

A clean build works as expected
$ mill clean
[1/1] clean
$ mill foo.run --help
[33/46] foo.compile
[info] compiling 2 Scala sources to /tmp/mainargs-repro/out/foo/compile.dest/classes ...
[info] done compiling
[46/46] foo.run
apply
  --help  Print another message.

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages