mirror of https://github.com/sbt/sbt.git
Fix side-effect file syncing when using symlink optimization
- Ensure output files are synced even when reading from symlink - Call findActionResult to get ActionResult for side-effect files - Maintains performance benefit while ensuring correctness - Addresses @eed3si9n's concern about tasks generating files on the side
This commit is contained in:
parent
08fe019dc0
commit
3abddf461a
|
|
@ -114,7 +114,13 @@ object ActionCache:
|
|||
then
|
||||
Exception.nonFatalCatch
|
||||
.opt(IO.read(resolvedValuePath.toFile(), StandardCharsets.UTF_8))
|
||||
.map(valueFromStr(_, Some("symlink")))
|
||||
.map: str =>
|
||||
// We still need to sync output files for side effects
|
||||
findActionResult(key, codeContentHash, extraHash, config) match
|
||||
case Right(result) =>
|
||||
store.syncBlobs(result.outputFiles, config.outputDirectory)
|
||||
case Left(_) => // Ignore if we can't find ActionResult
|
||||
valueFromStr(str, Some("symlink"))
|
||||
else None
|
||||
|
||||
readFromSymlink() match
|
||||
|
|
|
|||
Loading…
Reference in New Issue