Skip to content

No --watch'ed recompilation after clean #6114

@lefou

Description

@lefou

While in an editing session on Mill, I stumbled on a strange behavior.

After running mill -w __.compile for a long while, I couldn't explain some compiler error message and wanted to start over cleanly, so I run clean. But after that, mill -w __.compile did nothing.

> mill -w __.compile
...
Watching for changes to 1917 paths (via fsnotify) and 1897 other values...  (Enter to re-run, Ctrl-C to exit)
[14169/16437] core.api.daemon.compile
[14169] [info] compiling 1 Scala source to /home/lefou/work/opensource/mill/out/core/api/daemon/compile.dest/classes ...
[14169] [info] done compiling
[15525/16437] libs.javalib.compile
[15525] [info] compiling 17 Scala sources to /home/lefou/work/opensource/mill/out/libs/javalib/compile.dest/classes ...
[15525] ***** missing reference, looking for JsonValueCodec/T in package com.github.plokhotnyuk.jsoniter_scala.core
[15525] decls = Scope{}
[15525] [error] -- [E007] Type Mismatch Error: /home/lefou/work/opensource/mill/libs/javalib/src/mill/javalib/bsp/BspJavaModule.scala:153:4 
[15525] [error] 153 |    Task.Anon {
[15525] [error]     |    ^
[15525] [error]     |Found:    mill.api.Task[(Seq[String], Seq[String] & mill.api.Opts,
[15525] [error]     |  Map[String, mill.api.Opt])]
[15525] [error]     |Required: mill.Task.Simple[(classes : Seq[String], forkArgs : mill.api.Opts, forkEnv :
[15525] [error]     |  Map[String, mill.api.Opt])]
[15525] [error] 154 |      (jm.allLocalMainClasses(), jm.forkArgs(), jm.allForkEnv())
[15525] [error] 155 |    }
[15525] [error]     |
[15525] [error]     | longer explanation available when compiling with `-explain`
[15525] [error] one error found
[16437/16437, 1 failed] ============================== __.compile ============================== 6s
1 tasks failed
[15525] libs.javalib.compile Compilation failed
Watching for changes to 1917 paths (via fsnotify) and 1897 other values...  (Enter to re-run, Ctrl-C to exit)
^C

> mill clean
[1/1] clean
[1/1] ============================== clean ============================== 55s

>  mill -w __.compile
[66/66] ============================== __.compile ============================== 3s
Watching for changes to 1222 paths (via fsnotify) and 1212 other values...  (Enter to re-run, Ctrl-C to exit)

[66/66] ============================== __.compile ============================== 1s
Watching for changes to 1222 paths (via fsnotify) and 1212 other values...  (Enter to re-run, Ctrl-C to exit)
^C

> mill -w __.compile
[66/66] ============================== __.compile ============================== 1s
Watching for changes to 1222 paths (via fsnotify) and 1212 other values...  (Enter to re-run, Ctrl-C to exit)
^C

> mill clean
[1/1] clean
[1/1] ============================== clean ==============================

> mill -w __.compile
[66/66] ============================== __.compile ============================== 1s
Watching for changes to 1222 paths (via fsnotify) and 1212 other values...  (Enter to re-run, Ctrl-C to exit)
^C
> mill --version
Mill Build Tool version 1.0.6-95-b08901
Java version: 21.0.8, vendor: Azul Systems, Inc., runtime: /home/lefou/.cache/coursier/arc/https/cdn.azul.com/zulu/bin/zulu21.44.17-ca-jdk21.0.8-linux_x64.tar.gz/zulu21.44.17-ca-jdk21.0.8-linux_x64
Default locale: de_DE, platform encoding: UTF-8
OS name: "Linux", version: 6.6.92-gentoo-x86_64, arch: amd64

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions