sbt/util-cache/src/test/scala
MkDev11 fe6125d8d1
[2.x] feat: Cache failed compilation to avoid repeated failures (#8490)
When a compilation fails with CompileFailed, the failure is now cached
so that subsequent builds with the same inputs don't re-run the failed
compilation. This significantly improves the experience when using BSP
clients like Metals that may trigger many compilations in a row.

The implementation:
- Adds CachedCompileFailure, CachedProblem, and CachedPosition types
  to serialize compilation failures
- Modifies ActionCache.cache to catch CompileFailed exceptions and
  store them in the cache with exitCode=1
- On cache lookup, checks for cached failures first and re-throws
  the cached exception if found
- Fixes DiskActionCacheStore.put to preserve exitCode from request
- Adds unit test to verify cached failure behavior

Fixes #7662
2026-01-12 16:03:05 -05:00
..
sbt/util [2.x] feat: Cache failed compilation to avoid repeated failures (#8490) 2026-01-12 16:03:05 -05:00
CacheSpec.scala test: Migrate CacheSpec to verify.BasicTestSuite (#8474) 2026-01-11 07:19:22 -05:00
FileInfoSpec.scala update .scalafmt.conf. enforce new scala 3 syntax 2025-01-02 11:25:34 +09:00
SingletonCacheSpec.scala remove redundant `val` modifier 2025-10-06 09:28:27 +09:00