-
Notifications
You must be signed in to change notification settings - Fork 1.1k
Bootstrapped pickling exception when pickling locally defined class. #2340
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Comments
Can you make this into a self-contained test case? I tried to compile ZipArchive directly, but there were other incompatibilities which caused type errors. |
ZipArchive comes from scalac but was modified because the local class failed to be pickled correctly previously. This appear to be fixed now, so we can close scala#2340.
ZipArchive comes from scalac but was modified because the local class failed to be pickled correctly previously. This appear to be fixed now, so we can close scala#2340.
Reproduction, alas not minimal: #3825 |
Not sure it is the same issue, but this fails sealed class Entry(path: Int)
class Test {
def test = {
class FileEntry() extends Entry(1)
val f = new FileEntry()
}
} > dotc Test.scala -Ytest-pickler -Ystop-after:pickler
exception occurred while compiling Test.scala
Exception in thread "main" class dotty.tools.dotc.reporting.diagnostic.messages$Error at ?: pickling difference for class Entry in Test.scala, for details:
|
| diff before-pickling.txt after-pickling.txt
at dotty.tools.dotc.reporting.Reporting.error(Reporter.scala:88)
at dotty.tools.dotc.reporting.Reporting.error$(Reporter.scala:87)
at dotty.tools.dotc.core.Contexts$Context.error(Contexts.scala:68)
at dotty.tools.dotc.transform.Pickler.testSame(Pickler.scala:107)
at dotty.tools.dotc.transform.Pickler.$anonfun$testUnpickler$6(Pickler.scala:99)
at dotty.tools.dotc.transform.Pickler.$anonfun$testUnpickler$6$adapted(Pickler.scala:97)
at scala.collection.TraversableLike$WithFilter.$anonfun$foreach$1(TraversableLike.scala:789)
at scala.collection.mutable.HashMap.$anonfun$foreach$1(HashMap.scala:138)
at scala.collection.mutable.HashTable.foreachEntry(HashTable.scala:236)
at scala.collection.mutable.HashTable.foreachEntry$(HashTable.scala:229)
at scala.collection.mutable.HashMap.foreachEntry(HashMap.scala:40)
at scala.collection.mutable.HashMap.foreach(HashMap.scala:138)
at scala.collection.TraversableLike$WithFilter.foreach(TraversableLike.scala:788)
at dotty.tools.dotc.transform.Pickler.testUnpickler(Pickler.scala:97)
at dotty.tools.dotc.transform.Pickler.runOn(Pickler.scala:83)
at dotty.tools.dotc.Run.$anonfun$compileUnits$3(Run.scala:125)
at scala.runtime.java8.JFunction0$mcV$sp.apply(JFunction0$mcV$sp.java:12)
at dotty.tools.dotc.util.Stats$.trackTime(Stats.scala:47)
at dotty.tools.dotc.Run.$anonfun$compileUnits$2(Run.scala:123)
at dotty.tools.dotc.Run.$anonfun$compileUnits$2$adapted(Run.scala:121)
at scala.collection.IndexedSeqOptimized.foreach(IndexedSeqOptimized.scala:32)
at scala.collection.IndexedSeqOptimized.foreach$(IndexedSeqOptimized.scala:29)
at scala.collection.mutable.ArrayOps$ofRef.foreach(ArrayOps.scala:191)
at dotty.tools.dotc.Run.runPhases$1(Run.scala:121)
at dotty.tools.dotc.Run.$anonfun$compileUnits$1(Run.scala:141)
at scala.runtime.java8.JFunction0$mcV$sp.apply(JFunction0$mcV$sp.java:12)
at dotty.tools.dotc.util.Stats$.maybeMonitored(Stats.scala:88)
at dotty.tools.dotc.Run.compileUnits(Run.scala:107)
at dotty.tools.dotc.Run.compileSources(Run.scala:94)
at dotty.tools.dotc.Run.compile(Run.scala:78)
at dotty.tools.dotc.Driver.doCompile(Driver.scala:29)
at dotty.tools.dotc.Driver.process(Driver.scala:127)
at dotty.tools.dotc.Driver.process(Driver.scala:96)
at dotty.tools.dotc.Driver.process(Driver.scala:108)
at dotty.tools.dotc.Driver.main(Driver.scala:135)
at dotty.tools.dotc.Main.main(Main.scala)
java.lang.RuntimeException: Nonzero exit code returned from runner: 1
at scala.sys.package$.error(package.scala:27) The annotation |
@OlivierBlanvillain should have a look to that minimization. He has some experience and thoughts about |
ZipArchive comes from scalac but was modified because the local class failed to be pickled correctly previously. This appear to be fixed now, so we can close scala#2340.
Closes scala#2340
From ZipArchive.scala:
Pickling fails when bootstrapping this as part of the killing reflect io PR.
Message:
The text was updated successfully, but these errors were encountered: