mirror of https://github.com/sbt/sbt.git
Zinc records all of the compile source file hashes when compilation completes. This is problematic because its possible that a source file was changed during compilation. From the user perspective, this may mean that their source change will not be recompiled even if a build is triggered by the change. To overcome this, I add logic in the sbt provided external hooks to override the zinc analysis stamps. This is done by writing the source file stamps to the previous cache after compilation completes. This allows us to see the source differences from sbt's perspective, rather than zinc's perspective. We then merge the combined differences in the actual implementation of ExternalHooks. In some cases this may result in over-compilation but generally over-compilation is preferred to under compilation. Most of the time, the results should be the same. The scripted test that I added modifies a file during compilation by invoking a macro. It then effectively asserts that the file is recompiled during the next test run by validating the compilation result in the test. The test fails on the latest develop hash. |
||
|---|---|---|
| .. | ||
| src | ||
| NOTICE | ||