sbt/util-cache/src
BitToby e0bdb531f7
[2.x] fix: Widen IOException catch in organicTask to cover result serialization (#9050)
**Problem**
When a file referenced during cache serialization is deleted between task
execution and cache storage, sbt crashes with an uncaught NoSuchFileException.
The IOException catch added in #8699 only wraps store.put(), but
Converter.toJsonUnsafe(result) and mkInput() also call
hashedVirtualFileRefToStr which calls Files.readAttributes — and these are
outside the try-catch.

**Solution**
Move the try/catch IOException to wrap the entire post-action cache storage
section, so NoSuchFileException from result serialization or cache key
computation is caught and handled gracefully (skip caching, return result).

Fixes #9044

Co-authored-by: bittoby <218712309+bittoby@users.noreply.github.co>
2026-04-10 01:44:08 -04:00
..
main [2.x] fix: Widen IOException catch in organicTask to cover result serialization (#9050) 2026-04-10 01:44:08 -04:00
test/scala [2.x] feat: Add cacheVersion setting for global cache invalidation (#8993) 2026-04-01 11:23:10 +09:00