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

Scaladoc spurious error messages: error while loading package, class file ... contains wrong package package

    Details

    • Type: Bug Bug
    • Status: Closed
    • Priority: Major Major
    • Resolution: Fixed
    • Affects Version/s: None
    • Fix Version/s: Scala 2.10.0-M2
    • Component/s: None
    • Labels:
      None

      Description

      Clone scala/scala, compile it and run scaladoc in the repository root dir:

      $ git clone  git://github.com/scala/scala.git scala
      $ cd scala
      $ ant
      [...]
      $ echo "case class A" > test.scala
      $ build/pack/bin/scaladoc test.scala
      Picked up _JAVA_OPTIONS: -Xms1g -Xmx4g -Xss128m -XX:+CMSClassUnloadingEnabled -XX:MaxPermSize=512M -XX:ReservedCodeCacheSize=256m -XX:+UseParallelGC -XX:PermSize=256m
      warning: there were 1 deprecation warnings; re-run with -deprecation for details
      error: error while loading package, class file './build/locker/classes/compiler/scala/tools/cmd/package.class' contains wrong package package
      error: error while loading package, class file './build/locker/classes/compiler/scala/tools/util/color/package.class' contains wrong package package
      error: error while loading package, class file './build/locker/classes/compiler/scala/tools/reflect/package.class' contains wrong package package
      error: error while loading package, class file './build/locker/classes/compiler/scala/tools/nsc/package.class' contains wrong package package
      error: error while loading package, class file './build/locker/classes/compiler/scala/tools/nsc/symtab/package.class' contains wrong package package
      error: error while loading package, class file './build/locker/classes/compiler/scala/tools/nsc/symtab/classfile/package.class' contains wrong package package
      error: error while loading package, class file './build/locker/classes/compiler/scala/tools/nsc/interpreter/package.class' contains wrong package package
      error: error while loading package, class file './build/locker/classes/compiler/scala/tools/nsc/interpreter/session/package.class' contains wrong package package
      error: error while loading package, class file './build/locker/classes/compiler/scala/tools/nsc/util/package.class' contains wrong package package
      error: error while loading package, class file './build/locker/classes/compiler/scala/tools/nsc/io/package.class' contains wrong package package
      error: error while loading package, class file './build/locker/classes/library/scala/package.class' contains wrong package package
      error: error while loading package, class file './build/locker/classes/library/scala/annotation/target/package.class' contains wrong package package
      error: error while loading package, class file './build/locker/classes/library/scala/annotation/meta/package.class' contains wrong package package
      error: error while loading package, class file './build/locker/classes/library/scala/sys/package.class' contains wrong package package
      error: error while loading package, class file './build/locker/classes/library/scala/sys/process/package.class' contains wrong package package
      error: error while loading package, class file './build/locker/classes/library/scala/collection/package.class' contains wrong package package
      error: error while loading package, class file './build/locker/classes/library/scala/collection/immutable/package.class' contains wrong package package
      error: error while loading package, class file './build/locker/classes/library/scala/collection/parallel/package.class' contains wrong package package
      error: error while loading package, class file './build/locker/classes/library/scala/collection/parallel/immutable/package.class' contains wrong package package
      error: error while loading package, class file './build/locker/classes/library/scala/collection/parallel/mutable/package.class' contains wrong package package
      error: error while loading package, class file './build/locker/classes/library/scala/collection/generic/package.class' contains wrong package package
      error: error while loading package, class file './build/locker/classes/library/scala/math/package.class' contains wrong package package
      error: error while loading package, class file './build/locker/classes/library/scala/runtime/package.class' contains wrong package package
      error: error while loading package, class file './build/locker/classes/library/scala/reflect/package.class' contains wrong package package
      error: error while loading package, class file './build/locker/classes/library/scala/xml/package.class' contains wrong package package
      error: error while loading package, class file './build/locker/classes/library/scala/xml/pull/package.class' contains wrong package package
      error: error while loading package, class file './build/locker/classes/library/scala/concurrent/package.class' contains wrong package package
      error: error while loading package, class file './build/quick/classes/partest/scala/tools/partest/package.class' contains wrong package package
      error: error while loading package, class file './build/quick/classes/compiler/scala/tools/cmd/package.class' contains wrong package package
      error: error while loading package, class file './build/quick/classes/compiler/scala/tools/util/color/package.class' contains wrong package package
      error: error while loading package, class file './build/quick/classes/compiler/scala/tools/reflect/package.class' contains wrong package package
      error: error while loading package, class file './build/quick/classes/compiler/scala/tools/nsc/package.class' contains wrong package package
      error: error while loading package, class file './build/quick/classes/compiler/scala/tools/nsc/symtab/package.class' contains wrong package package
      error: error while loading package, class file './build/quick/classes/compiler/scala/tools/nsc/symtab/classfile/package.class' contains wrong package package
      error: error while loading package, class file './build/quick/classes/compiler/scala/tools/nsc/interpreter/package.class' contains wrong package package
      error: error while loading package, class file './build/quick/classes/compiler/scala/tools/nsc/interpreter/session/package.class' contains wrong package package
      error: error while loading package, class file './build/quick/classes/compiler/scala/tools/nsc/util/package.class' contains wrong package package
      error: error while loading package, class file './build/quick/classes/compiler/scala/tools/nsc/io/package.class' contains wrong package package
      error: error while loading package, class file './build/quick/classes/library/scala/package.class' contains wrong package package
      error: error while loading package, class file './build/quick/classes/library/scala/swing/package.class' contains wrong package package
      error: error while loading package, class file './build/quick/classes/library/scala/annotation/target/package.class' contains wrong package package
      error: error while loading package, class file './build/quick/classes/library/scala/annotation/meta/package.class' contains wrong package package
      error: error while loading package, class file './build/quick/classes/library/scala/dbc/package.class' contains wrong package package
      error: error while loading package, class file './build/quick/classes/library/scala/sys/package.class' contains wrong package package
      error: error while loading package, class file './build/quick/classes/library/scala/sys/process/package.class' contains wrong package package
      error: error while loading package, class file './build/quick/classes/library/scala/collection/package.class' contains wrong package package
      error: error while loading package, class file './build/quick/classes/library/scala/collection/immutable/package.class' contains wrong package package
      error: error while loading package, class file './build/quick/classes/library/scala/collection/parallel/package.class' contains wrong package package
      error: error while loading package, class file './build/quick/classes/library/scala/collection/parallel/immutable/package.class' contains wrong package package
      error: error while loading package, class file './build/quick/classes/library/scala/collection/parallel/mutable/package.class' contains wrong package package
      error: error while loading package, class file './build/quick/classes/library/scala/collection/generic/package.class' contains wrong package package
      error: error while loading package, class file './build/quick/classes/library/scala/math/package.class' contains wrong package package
      error: error while loading package, class file './build/quick/classes/library/scala/util/continuations/package.class' contains wrong package package
      error: error while loading package, class file './build/quick/classes/library/scala/runtime/package.class' contains wrong package package
      error: error while loading package, class file './build/quick/classes/library/scala/reflect/package.class' contains wrong package package
      error: error while loading package, class file './build/quick/classes/library/scala/xml/package.class' contains wrong package package
      error: error while loading package, class file './build/quick/classes/library/scala/xml/pull/package.class' contains wrong package package
      error: error while loading package, class file './build/quick/classes/library/scala/actors/package.class' contains wrong package package
      error: error while loading package, class file './build/quick/classes/library/scala/concurrent/package.class' contains wrong package package
      model contains 2 documentable templates
      one warning found
      59 errors found
      

      Always appears if you run in the cloned repo root (<path>/scala) or in the build dir (<path>/scala/build).

        Activity

        Hide
        Vlad Ureche added a comment -

        The root cause is that if no classpath is given, scaladoc/scalac add "." to the classpath by default. A workaround until I find a proper fix is running scaladoc with -classpath "":

        scaladoc -classpath "" ...
        
        Show
        Vlad Ureche added a comment - The root cause is that if no classpath is given, scaladoc/scalac add "." to the classpath by default. A workaround until I find a proper fix is running scaladoc with -classpath "" : scaladoc -classpath "" ...
        Hide
        Vlad Ureche added a comment -

        Fixed in 72c104b8b7.

        Show
        Vlad Ureche added a comment - Fixed in 72c104b8b7 .

          People

          • Assignee:
            Vlad Ureche
            Reporter:
            Vlad Ureche
          • Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved:

              Development