mirror of https://github.com/sbt/sbt.git
@olegych reported in https://github.com/sbt/sbt/issues/4722 that sometimes even when a build was triggered during watch that no recompilation would occur. The cause of this was that we never invalidated the file stamp cache for managed sources or output files. The optimization of persisting the source file stamps between task evaluations in a continuous build only really makes sense for unmanaged sources. We make the implicit assumption that unmanaged sources are infrequently updated and generally one at a time. That assumption does not hold for unmanaged source or output files. To fix this, I split the fileStampCache into two caches: one for unmanaged sources and one for everything else. We only persist the unmanagedFileStampCache during continuous builds. The managedFileStampCache gets invalidated every time. I added a scripted test that simulates changing a generated source file. Prior to this change, the test would fail because the file stamp was not invalidated for the new source file content. Fixes #4722 |
||
|---|---|---|
| .. | ||
| src/main/scala/sbt/scriptedtest | ||
| NOTICE | ||