[2.x] fix: resolve virtual path in -Ypickle-write scalac option (#9011) (#9035)

earlyOutput is a virtual file reference, so passing it directly via
.toString produces a virtual path that scalac cannot resolve. Use
fileConverter.value.toPath() to convert it to an actual filesystem path.

Co-authored-by: corevibe555 <45244658+corevibe555@users.noreply.github.com>
Co-authored-by: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
This commit is contained in:
eugene yokota 2026-04-06 23:09:13 -04:00 committed by GitHub
parent 372b945651
commit 91be1a2f7e
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
1 changed files with 5 additions and 1 deletions

View File

@ -1085,7 +1085,11 @@ object Defaults extends BuildCommon {
)
if (shouldApplyFlags)
Def.uncached(
Vector("-Ypickle-java", "-Ypickle-write", earlyOutput.value.toString) ++ old
Vector(
"-Ypickle-java",
"-Ypickle-write",
fileConverter.value.toPath(earlyOutput.value).toString
) ++ old
)
else Def.uncached(old)
} else Def.uncached(old)