-
-
Notifications
You must be signed in to change notification settings - Fork 360
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
Investigate why changing the body of a task or method causes downstream files to re-compile #3748
Comments
Here's a minimal reproduction of the problem with Zinc 1.10.2 incremental compilation outside of Mill:
package build
object outer {
def foo = { build.subfolder.inner.helperFoo }
}
package build.subfolder
import build.{outer => unused}
class Unused
object inner {
def helperFoo = { 1 }
} In Scala 2.13.15:
In Scala 3.5.0:
|
Seems like a regression in Zinc 1.10.x, starting 1.10.0-M1. Reverting to 1.9.6 seems to fix the problem (?) |
sbt/zinc#1461. Not sure if this is the only issue, but it seems to make the test introduced in #3750 behave appropriately |
Ref #1284 Fixes #1461 Fixes #1420 Also fixes com-lihaoyi/mill#3748 downstream Not sure if there's a better way to fix this? Just opening this to spark discussion The original bugs are fine, but the solution seems incorrect, and is both overly conservative (invalidating everything based on whitespace?) and not conservative enough (doesn't handle cycles with length > 2?).
In the
CodeSigSubfolderTests
suite, we can see that modifying the body of task or helper method in the upstreamsubfolder/package.mill
causes the downstreambuild.mill
to recompile:mill/integration/invalidation/codesig-subfolder/src/CodeSigSubfolderTests.scala
Lines 42 to 73 in 5f617f0
This is at odds with how incremental compilation is meant to work, and indeed when testing out simple two-file compilation modules standalone, changing the body of a method in an upstream file without changing the signature does not cause the downstream file to recompile
The text was updated successfully, but these errors were encountered: