Closed dwijnand closed 1 month ago
PlainFile vs virtual file it seems:
Me too.
sbt:root> junit/testOnly test.scala.sys.process.ProcessTest
[info] compiling 3 Scala sources to /home/amarki/projects/scala/build/quick/classes/library ...
[error] ## Exception when compiling 569 sources to /home/amarki/projects/scala/build/quick/classes/library
[error] scala.MatchError: /home/amarki/projects/scala/src/library/scala/sys/process/ProcessBuilder.scala (of class scala.reflect.io.PlainFile)
[error] xsbt.API$ApiPhase.processScalaUnit(API.scala:62)
[error] xsbt.API$ApiPhase.processUnit(API.scala:57)
[error] xsbt.API$ApiPhase.apply(API.scala:53)
[error] scala.tools.nsc.Global$GlobalPhase.applyPhase(Global.scala:467)
[error] scala.tools.nsc.Global$GlobalPhase.run(Global.scala:414)
[error] xsbt.API$ApiPhase.run(API.scala:35)
[error] scala.tools.nsc.Global$Run.compileUnitsInternal(Global.scala:1530)
[error] scala.tools.nsc.Global$Run.compileUnits(Global.scala:1514)
[error] scala.tools.nsc.Global$Run.compileSources(Global.scala:1506)
[error] scala.tools.nsc.Global$Run.compileFiles(Global.scala:1619)
[error] xsbt.CachedCompiler0.run(CompilerBridge.scala:163)
Restarting sbt didn't help, but taking the hint, deleting the package classes worked. I'm pretty sure it started after an edit of the source file.
Tonight my me-too moment was also with Seq.scala
.
One may ask, well how often does one edit Seq.scala
. Actually, I was editing Iterator.scala
too.
steps
Sorry, I don't have exact steps, but after this happening a few times in a row in the same hour I thought I'd still report it to get the ball rolling. Basically I rebased a branch and compiled...
problem
expectation
Non-partial pattern matches...
notes
After a
rm build/quick/classes/library/scala/collection/Seq*
it fixed it self, thankfully: