-
Notifications
You must be signed in to change notification settings - Fork 1.2k
Incremental compilation hiccup with sealed when switching branches or projects #25273
Copy link
Copy link
Open
Description
Compiler version
3.8.2
Minimized code
I often need to clean when juggling projects or branches. Here, I'd run a bootstrapped test on a clean repository, switched branches (with the same build files), and wanted to run a nonbootstrapped test.
I did not "nail down" whether it's the project switch or the branch switch that fools incremental compilation.
sbt:scala3-bootstrapped> project scala3-nonbootstrapped
sbt:scala3-nonbootstrapped> testCompilation tests/neg/i24096.scalaOutput
error] Cannot extend sealed class Either in a different source file
[error] |
[error] | longer explanation available when compiling with `-explain`
[error] Cannot extend sealed class Option in a different source file
[error] |
[error] | longer explanation available when compiling with `-explain`
[error] two errors found
[error] (scala-library-nonbootstrapped / Compile / compileIncremental) Compilation failedExpectation
Obviously, the error is mistaken; non-obviously, maybe it can detect that a stale build artifact must be discarded or refreshed.
Reactions are currently unavailable