Skip to content

Mill doesn't watch or restarts zio-http projects #2077

Answered by lefou
carlosedp asked this question in Q&A
Discussion options

You must be logged in to vote

IIRC, sbt-revolver is interrupting a running process when it detects changes. Mills JavaModule.run does not. Instead, it would re-run once the process has ended and only after changes were detected.

If you want your server process to stop and restart whenever its sources have changed, you can try to use JavaModule.runBackground.

$ mill inspect main.runBackground
[1/1] inspect 
main.runBackground(JavaModule.scala:697)
    Runs this module's code in a background process, until it dies or
    `runBackground` is used again. This lets you continue using Mill while
    the process is running in the background: editing files, compiling, and
    only re-starting the background process when you're…

Replies: 4 comments 1 reply

Comment options

You must be logged in to vote
0 replies
Answer selected by lefou
Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
1 reply
@ajrnz
Comment options

Comment options

You must be logged in to vote
0 replies
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
3 participants
Converted from issue

This discussion was converted from issue #2076 on October 20, 2022 20:41.