[#1044] | project: compiler | priority: high | category: bug | |
---|---|---|---|---|
submitter | assigned to | status | date submitted | |
Martin | Lex | fixed | 2007-04-12 15:21:23.0 | |
subject | interpreter crash | |||
code |
scala> generalSize(Math.Pi) Exception in thread "main" java.io.FileNotFoundException: C:\DOCUME~1\odersky\LOCALS~1\Temp\scalaint58631\line35$object$$import$$import$$import$$import$$import$$import$$import$$import$$import$$import$$import$$import$$import$$import$$import$$import$$import$$import$$import$$import$$import$$import$$import$$import$$import$$import$$import$$import$$import$$import$.class (The filename, directory name, or volume label syntax is incorrect) at java.io.FileOutputStream.open(Native Method) at java.io.FileOutputStream.<init>(Unknown Source) at java.io.FileOutputStream.<init>(Unknown Source) at ch.epfl.lamp.fjbg.JClass.writeTo(JClass.java:256) at ch.epfl.lamp.fjbg.JClass.writeTo(JClass.java:243) at scala.tools.nsc.backend.jvm.GenJVM$BytecodeGenerator.emitClass(GenJVM.scala:126) at scala.tools.nsc.backend.jvm.GenJVM$BytecodeGenerator.genClass(GenJVM.scala:199) at scala.tools.nsc.backend.jvm.GenJVM$JvmPhase$$anonfun$0.apply(GenJVM.scala:44) at scala.tools.nsc.backend.jvm.GenJVM$JvmPhase$$anonfun$0.apply(GenJVM.scala:44) at scala.Iterator$class.foreach(Iterator.scala:380) at scala.collection.Map$$anon$2.foreach(Map.scala:119) at scala.tools.nsc.backend.jvm.GenJVM$JvmPhase.run(GenJVM.scala:44) at scala.tools.nsc.Global$Run.compileSources(Global.scala:491) at scala.tools.nsc.Interpreter$Request.compile(Interpreter.scala:556) at scala.tools.nsc.Interpreter.interpret(Interpreter.scala:346) at scala.tools.nsc.InterpreterLoop.interpretStartingWith(InterpreterLoop.scala:230) at scala.tools.nsc.InterpreterLoop.command(InterpreterLoop.scala:217) at scala.tools.nsc.InterpreterLoop.repl(InterpreterLoop.scala:130) at scala.tools.nsc.InterpreterLoop.main(InterpreterLoop.scala:265) at scala.tools.nsc.MainGenericRunner$.main(MainGenericRunner.scala:92) at scala.tools.nsc.MainGenericRunner.main(MainGenericRunner.scala) |
|||
what happened | After some interaction the interpreter crashes with the above stacktrace (on Windows). I believe the filenames a\ re getting too long. |
|||
what expected | We should keep import names short. Probably some running number instead of a linear string. | |||
[back to overview] |
Martin edited on 2007-04-12 15:32:29.0 |
Lex edited on 2007-04-12 17:12:17.0 |
The names are long because there are deeply nested objects involved. I will try to shorten the names and thus delay the problem, but I do not know a great way to avoid the problem without finding a way to do imports that does not require nested objects. Here are two ways to decrease the nesting depth. First, do not create new nesting levels when it is obviously not necessary (e.g. an import of x followed by an import of y). Second, try to reject imports that are obviously not useful (e.g., an import of x followed immediately by another import of x). |
Stephane edited on 2007-04-17 15:06:53.0 |
Lex edited on 2007-04-18 05:13:05.0 |
In various ways the nesting of imports is now decreased and the class names thus greatly shortened. Hopefully this is enough to address the practical difficulties with this particular issue. |