Uploaded image for project: 'Scala Programming Language'
  1. Scala Programming Language
  2. SI-3844

Scalac-net does not compile trivial sample to dot Net

    Details

    • Type: Bug
    • Status: CLOSED
    • Priority: Major
    • Resolution: Not a Bug
    • Affects Version/s: None
    • Fix Version/s: Scala 2.10.0-M3
    • Component/s: Compiler (Misc)
    • Labels:
      None
    • Environment:

      scala msil dot Net 2.8.0

      Description

      Hi to all,
      I have a trivial Scala source that with Scala 2.7.7 is compiled in dot Net using the dot Net runtime 2.0 and the 4.0 (both on Windows XP and Windows 7 at 64 bit). The same gives me a strange error only changing the Scala version to 2.8.0 .

      Maybe the problem could be only in giving the right classpath to the scalac-net tool ... because the missing class if present if scala-msil jars.

      This is the detail of the error:

      >scalac-net HelloWorld.scala
      scala.tools.nsc.MissingRequirementError: class scala.runtime.VolatileBooleanRef not found.
              at scala.tools.nsc.symtab.Definitions$$definitions$$.getModuleOrClass(Definitions.scala:513)
              at scala.tools.nsc.symtab.Definitions$$definitions$$.getClass(Definitions.scala:471)
              at scala.tools.nsc.symtab.Definitions$$definitions$$.newValueClass(Definitions.scala:620)
              at scala.tools.nsc.symtab.Definitions$$definitions$$.BooleanClass(Definitions.scala:92)
              at scala.tools.nsc.symtab.Definitions$$definitions$$.initValueClasses(Definitions.scala:643)
              at scala.tools.nsc.symtab.Definitions$$definitions$$.init(Definitions.scala:787)
              at scala.tools.nsc.Global$$Run.<init>(Global.scala:597)
              at scala.tools.nsc.Main$$.process(Main.scala:107)
              at scala.tools.nsc.Main$$.main(Main.scala:122)
              at scala.tools.nsc.Main.main(Main.scala)
      error: fatal error: class scala.runtime.VolatileBooleanRef not found.
       
       
      >scalac-net -verbose HelloWorld.scala
      [AssemRefs = .]
      Exception in thread "main" java.lang.RuntimeException: Unknown
              at scala.tools.nsc.util.AssemblyClassPath.asClasspathString(MsilClassPath.scala:115)
              at scala.tools.nsc.util.AssemblyClassPath.asClasspathString(MsilClassPath.scala:108)
              at scala.tools.nsc.util.MergedClassPath$$$$anonfun$$asClasspathString$$1.apply(ClassPath.scala:338)
              at scala.tools.nsc.util.MergedClassPath$$$$anonfun$$asClasspathString$$1.apply(ClassPath.scala:338)
              at scala.collection.TraversableLike$$$$anonfun$$map$$1.apply(TraversableLike.scala:206)
              at scala.collection.TraversableLike$$$$anonfun$$map$$1.apply(TraversableLike.scala:206)
              at scala.collection.LinearSeqOptimized$$class.foreach(LinearSeqOptimized.scala:61)
              at scala.collection.immutable.List.foreach(List.scala:45)
              at scala.collection.TraversableLike$$class.map(TraversableLike.scala:206)
              at scala.collection.immutable.List.map(List.scala:45)
              at scala.tools.nsc.util.MergedClassPath.asClasspathString(ClassPath.scala:338)
              at scala.tools.nsc.Global.<init>(Global.scala:220)
              at scala.tools.nsc.Main$$.process(Main.scala:91)
              at scala.tools.nsc.Main$$.main(Main.scala:122)
              at scala.tools.nsc.Main.main(Main.scala)
       

      In the attached zip you can find the source and batch scripts that I use, to simplify your tests. The same error occurs also on the second trivial source (test.scala).
      Note that paths inside are for my develop environment, you'll have to adapt to yours.

      Let me know if I can give more infos.

      Best Regards,
      Sandro

        Attachments

          Activity

          Hide
          smartini Sandro Martini added a comment -

          sample source and scripts for setup the environment

          Show
          smartini Sandro Martini added a comment - sample source and scripts for setup the environment
          Hide
          rytz Lukas Rytz added a comment -

          I just tried your HelloWorld on Windows XP and it works for me (with a scala-msil nightly build). Wild guess: if some of the paths to scala / scalac / .jars contains spaces that could be a problem.

          Show
          rytz Lukas Rytz added a comment - I just tried your HelloWorld on Windows XP and it works for me (with a scala-msil nightly build). Wild guess: if some of the paths to scala / scalac / .jars contains spaces that could be a problem.
          Hide
          smartini Sandro Martini added a comment -

          Hi, thanks for the help.

          I'm sure I don't have folders with spaces inside the name,
          but I'm happy that current nightly builds solve it.

          Thank you very much,
          Sandro

          Show
          smartini Sandro Martini added a comment - Hi, thanks for the help. I'm sure I don't have folders with spaces inside the name, but I'm happy that current nightly builds solve it. Thank you very much, Sandro
          Hide
          rytz Lukas Rytz added a comment -

          I just tries 2.8.0.final as well and can confirm your error. Try a nightly build http://www.scala-lang.org/node/212/distributions-msil

          Show
          rytz Lukas Rytz added a comment - I just tries 2.8.0.final as well and can confirm your error. Try a nightly build http://www.scala-lang.org/node/212/distributions-msil

            People

            • Assignee:
              Unassigned
              Reporter:
              smartini Sandro Martini
            • Votes:
              0 Vote for this issue
              Watchers:
              1 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: