Mill clean should stop/prevent reuse of previously created workers. #3272
Replies: 3 comments 3 replies
-
Interesting. Stopping all workers can be costly, especially closing the ubiquitously used ZincWorker would lead to drastically increased build times after a clean. So, the current behavior isn't something we should change lightly. On the other hand, since workers have a Maybe, we could create some analogy to As an alternative, we could introspect the worker for some specific interface. We already do this when we close a worker. When a worker implements the @lihaoyi WDYT? |
Beta Was this translation helpful? Give feedback.
-
Ok, that would be a cost I personally am willing to pay. For me clean is
For me even an acceptable alternative is something like an extra flag: |
Beta Was this translation helpful? Give feedback.
-
I think clean shutting down workers makes sense |
Beta Was this translation helpful? Give feedback.
-
TLDR:
mill clean
should stop workers / or discard them.I have a mill build with some webpack workers, which stay up. I sometimes had a puzzling state
where these workers seem complete out of sync. I've noticed that a
./mill clean
breaks them.Here is a small demostration, without webpack ;)
build.sc:
Demostration of the issue:
As demostrated, the
mill clean
cleans the out directory, but does not stop the worker.Then, when the worker is invoked again, it's working directory is wiped.
In this demostration, it simply crashes.
In the real work this ends up with a webpack worker with a broken working directory,
producting garbage results.
Therefore, I think that
mill clean
should kill/restart workers.Better solutions are of course also welcome.
Beta Was this translation helpful? Give feedback.
All reactions