Files
sbt/notes
f78a141dd5 [2.0.x] fix: Report a missing input file clearly instead of an opaque SerializationException (#9275)
When a file referenced by a task's inputs/outputs (e.g. `Compile / resources +=
file("nope.txt")`) does not exist, hashing the task's cache key threw a
NoSuchFileException deep inside sjsonnew serialization. It surfaced as an opaque
sjsonnew.SerializationException that dumped the entire input list, with the real
cause buried several `Caused by:` levels down, so users routinely mistook it for
a corrupt cache and reached for `clean`.

ActionCache.mkInput now catches the hashing failure, detects a NoSuchFileException
anywhere in the cause chain (ActionCache.findMissingFile), and throws a
MessageOnlyException naming the file:

    [error] file referenced by the build does not exist: nope.txt

util-cache gains a dependency on util-control (a leaf module, no cycle) for
MessageOnlyException.

Fixes #9217.

Co-authored-by: Brian Hotopp <[email protected]>
Co-authored-by: Claude Opus 4.8 (1M context) <[email protected]>
2026-05-30 21:13:42 -04:00
..
2018-05-04 16:39:05 +02:00
2016-05-06 16:01:49 -04:00
2016-05-06 16:01:49 -04:00
2016-05-06 16:01:49 -04:00
2016-05-06 16:01:49 -04:00
2025-02-04 01:11:28 -05:00
2025-02-04 01:11:28 -05:00
2019-09-05 14:11:13 -04:00
2019-09-05 14:11:04 -04:00
2025-02-04 01:11:28 -05:00
2019-09-05 14:11:04 -04:00
2019-09-05 14:11:13 -04:00
2019-09-05 14:11:13 -04:00
2025-02-04 01:11:28 -05:00
2019-09-05 14:11:04 -04:00
2017-09-16 20:32:33 -04:00
2017-10-26 22:39:35 -04:00
2025-02-04 01:11:28 -05:00
2025-02-04 01:11:28 -05:00
2019-09-05 14:11:04 -04:00
2019-09-05 14:11:13 -04:00
2017-12-15 01:49:14 +00:00