mirror of https://github.com/sbt/sbt.git
**Problem** When project A's dependencies changed and A was compiled in one command, project B (depending on A) would not invalidate its update cache in a subsequent command. This caused stale classpaths. The root cause was that `depsUpdated` only checked `!stats.cached`, which only detected fresh resolves within the same command. When a dependency was served from cache (even if resolved fresh in a previous command), `cached` was marked `true`, causing incorrect cache reuse. Debug scenario from issue: sbt:aaa> clean sbt:aaa> a/compile sbt:aaa> show itTests/depsUpdated [info] * false <-- BUG: should be true **Solution** Added `stamp: String` field to `UpdateStats` that records when the update was resolved. This stamp persists across commands and enables accurate cross-command comparison: - If any dependency's stamp > our cached stamp, we re-resolve - Falls back to `!cached` check for backwards compatibility with old caches - Using `String` type allows future transition from timestamps to content hashes |
||
|---|---|---|
| .. | ||
| src | ||
| NOTICE | ||