mirror of https://github.com/sbt/sbt.git
Change the behavior when a cached task's output type contains java.io.File: instead of silently skipping the cache, throw a compile-time error with a message recommending xsbti.VirtualFileRef, xsbti.HashedVirtualFileRef, or xsbti.VirtualFile, and linking to the caching documentation. Internal sbt tasks that return File types are wrapped with Def.uncached to opt out of caching. Fixes https://github.com/sbt/sbt/issues/8762 Generated-by: GitHub Copilot (Claude) * [2.x] fix: Reject java.io.File as cached task output type Use @transient on File-returning keys in Keys.scala instead of wrapping tasks with Def.uncached in Defaults.scala. This ensures build users who rewire these tasks also get caching skipped automatically. - Add @transient to 19 File-returning taskKey definitions in Keys.scala - Revert Def.uncached wrappers from Defaults.scala - Error at compile time when File is used as cached task output type - Update error message to recommend @transient and link to docs - Update scripted tests to use @transient approach Fixes #8762 Generated-by: GitHub Copilot (Claude Opus 4.6) |
||
|---|---|---|
| .. | ||
| src | ||
| NOTICE | ||