-
-
Notifications
You must be signed in to change notification settings - Fork 354
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add an option to disable incremental compilation with zinc #2851
Add an option to disable incremental compilation with zinc #2851
Conversation
We have For sure I would avoid having |
1a39164
to
5979a7c
Compare
👍 thanks for the feedback @lolgab, updated to use |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good to me. Thank you!
If we want to merge this into Mill 0.11.x, we need to add the backward-compatible overrides. Best is to mark those with @deprecated("Use other override instead", "Mill 0.11.6")
Thanks @lefou, I just tried that and
I pushed up my change, let me know if anything stands out to you |
@mrdziuban I think I fixed the Mima report. It would be nice, if you could add a section about this new option to the documentation. I think https://mill-build.com/mill/Scala_Module_Config.html is a good place. |
@lefou docs added! I also tested the option in my project to confirm it worked and found that it didn't, but I was able to get it working by following the |
@mrdziuban Can you please describe why you need the additional To my understanding, this should not be necessary, as Mill already detects any relevant changes to the inputs of the |
If this is about "flakiness" in zinc, adding an integration test to establish trust is the way to go. |
@lefou I realize the end goal in my project might not be accurately described by disabling incremental compilation. What I want/need is for this: ./mill my-project[3.3.1].compile to always compile every file in I recognize that that might not be desirable, or might not align with everyone's understanding of disabling incremental compilation, and since I implemented the def scalacOptions = T.input {
super.scalacOptions ++ Seq(s"-Jdummy=${Instant.now.toEpochMilli}")
} That said, I would be happy with any of these options:
I could add an integration test, but I'm juggling this with other work at my day job so can't guarantee that I'll get to it super quickly 🙂 Let me know what you think |
I'd prefer this option. I think there is some value in this PR, as it helps to easily work around zinc issues in rare cases.
The change is pretty straight forward, so IMHO a test is nice to have but not essential. If you roll back the cache buster, we can merge as is. Feel free, to open a follow up PR with a test, if you're in the mood. |
👍 done |
Thank you, @mrdziuban ! |
This was sparked by a conversation in gitter about forcing a full recompile for a given module.
The change to
ZincWorkerApi
is not binary compatible, but it could be if I added overloads for bothcompileJava
andcompileMixed
-- let me know if you think I should.