Scala Programming Language
  1. Scala Programming Language
  2. SI-5717

AssertionError on filesystem state (package dir is not a dir)

    Details

    • Type: Improvement Improvement
    • Status: Closed
    • Priority: Major Major
    • Resolution: Fixed
    • Affects Version/s: Scala 2.10.0
    • Fix Version/s: Scala 2.11.0-M3
    • Component/s: Misc Compiler
    • Environment:

      Scala compiler version 2.10.0-20120427-072818-d262fe9545
      CYGWIN_NT-6.1-WOW64

      Description

      A regular file named "a" conflicted with a package name "a". Not a common coincidence, unless maybe you're a learner trying things out with scalac. The helpful message without the scary verbose stack traces, and two of them, would be nice; in this case, an assert might be too strong to test isDir.

      error:
      while compiling: b.scala
      current phase: jvm
      library version: version 2.10.0-20120426-153557-2a9cce8a68
      compiler version: version 2.10.0-20120426-153557-2a9cce8a68
      reconstructed args:

      uncaught exception during compilation: java.lang.AssertionError
      error: java.lang.AssertionError: assertion failed: Tried to find 'Test.class' in '.\a' but it is not a directory
      at scala.Predef$.assert(Predef.scala:182)
      at scala.tools.nsc.io.AbstractFile.fileNamed(AbstractFile.scala:238)
      at scala.tools.nsc.backend.jvm.BytecodeWriters$class.getFile(BytecodeWriters.scala:35)
      at scala.tools.nsc.backend.jvm.BytecodeWriters$class.scala$tools$nsc$backend$jvm$BytecodeWriters$$getFile(BytecodeWriters.scala:38)
      at scala.tools.nsc.backend.jvm.BytecodeWriters$ClassBytecodeWriter$class.writeClass(BytecodeWriters.scala:90)
      at scala.tools.nsc.backend.jvm.GenJVM$JvmPhase$$anon$3.writeClass(GenJVM.scala:158)
      at scala.tools.nsc.backend.jvm.GenJVM$BytecodeGenerator.emitClass(GenJVM.scala:348)
      at scala.tools.nsc.backend.jvm.GenJVM$BytecodeGenerator.generateMirrorClass(GenJVM.scala:1166)
      at scala.tools.nsc.backend.jvm.GenJVM$BytecodeGenerator.genClass(GenJVM.scala:442)
      at scala.tools.nsc.backend.jvm.GenJVM$JvmPhase$$anonfun$run$2.apply(GenJVM.scala:169)
      at scala.tools.nsc.backend.jvm.GenJVM$JvmPhase$$anonfun$run$2.apply(GenJVM.scala:168)
      at scala.collection.LinearSeqOptimized$class.foreach(LinearSeqOptimized.scala:59)
      at scala.collection.immutable.List.foreach(List.scala:77)
      at scala.tools.nsc.backend.jvm.GenJVM$JvmPhase.run(GenJVM.scala:168)
      at scala.tools.nsc.Global$Run.compileUnitsInternal(Global.scala:1336)
      at scala.tools.nsc.Global$Run.compileUnits(Global.scala:1309)
      at scala.tools.nsc.Global$Run.compileSources(Global.scala:1303)
      at scala.tools.nsc.Global$Run.compile(Global.scala:1436)
      at scala.tools.nsc.Driver.doCompile(Driver.scala:31)
      at scala.tools.nsc.Main$.doCompile(Main.scala:81)
      at scala.tools.nsc.Driver.process(Driver.scala:52)
      at scala.tools.nsc.Driver.main(Driver.scala:65)
      at scala.tools.nsc.Main.main(Main.scala)

        Activity

        Show
        Paul Phillips added a comment - https://github.com/scala/scala/pull/1746
        Hide
        Adriaan Moors added a comment -

        Un-assigning to foster work stealing, as announced in https://groups.google.com/forum/?fromgroups=#!topic/scala-internals/o8WG4plpNkw

        Show
        Adriaan Moors added a comment - Un-assigning to foster work stealing, as announced in https://groups.google.com/forum/?fromgroups=#!topic/scala-internals/o8WG4plpNkw
        Hide
        A. P. Marki added a comment -

        https://github.com/scala/scala/pull/2260

        Yes, I stole paulp's work.

        Show
        A. P. Marki added a comment - https://github.com/scala/scala/pull/2260 Yes, I stole paulp's work.

          People

          • Assignee:
            A. P. Marki
            Reporter:
            A. P. Marki
          • Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved:

              Development