Status of Scala on the .NET platform?

64 views
Skip to first unread message

Peter C. Chapin

unread,
Feb 11, 2011, 8:23:51 PM2/11/11
to Scala User
Out of curiosity this evening I attempted to compile "Hello World" using
Scala for .NET. This wasn't an entirely random thing for me to do; if Scala
for .NET is reasonably usable I have a situation where I might want to use
it.

I'm running Windows 7, 64 bit edition. I have Scala 2.8.1.final installed. I
also have the latest .NET framework installed. I used sbaz to download and
install the scala-msil package. I then wrote the following program

object HelloNET {
def main(args: Array[String]) {
println("Hello, World!")
}
}

I attempted to compile this with

scalac -target:msil HelloNET.scala

However the compiler terminates with an unhandled exception. In particular:

scala.tools.nsc.MissingRequirementError: class
scala.runtime.VolatileBooleanRef not found.
at
scala.tools.nsc.symtab.Definitions$definitions$.getModuleOrClass(Definitions.scala:517)
at
scala.tools.nsc.symtab.Definitions$definitions$.getClass(Definitions.scala:475)
at
scala.tools.nsc.symtab.Definitions$definitions$.newValueClass(Definitions.scala:624)
at
scala.tools.nsc.symtab.Definitions$definitions$.BooleanClass(Definitions.scala:92)
at
scala.tools.nsc.symtab.Definitions$definitions$.initValueClasses(Definitions.scala:647)
at
scala.tools.nsc.symtab.Definitions$definitions$.init(Definitions.scala:791)
at scala.tools.nsc.Global$Run.<init>(Global.scala:604)
at scala.tools.nsc.Main$.process(Main.scala:105)
at scala.tools.nsc.Main$.main(Main.scala:120)
at scala.tools.nsc.Main.main(Main.scala)
error: fatal error: class scala.runtime.VolatileBooleanRef not found.

I looked around on the 'net a little and I can see that Scala for .NET is a
work in progress. Still... is it expected for it to not work at all here, or
am I doing something wrong?

Thanks!

Peter

Miguel Garcia

unread,
Feb 12, 2011, 5:24:56 AM2/12/11
to scala...@googlegroups.com

Peter, 

I know it's not working and yet progress is being made on Scala.NET. Details follow. 

That exception is the compiler's way to report that neither scalaruntime.dll nor the other dlls in -Xassem-extdirs contain the type VolatileBooleanRef. Trying with trunk would result in a similar exception for another type. 

Which brings us to the progress being made. Until recently, Scala.NET took upon itself to perform, alongside compilation, the conversion from JDK dependencies into IKVM ones. That design decision assumed most Scala.NET programs were written initially to run on the JVM. 

Alas, the code in charge of that conversion kept growing with no end in sight, that's why a re-architecting was deemed necessary (factoring out JDK-to-IKVM into a source-to-source pre-processor [1]). That tool is doing its job just fine, making us confident of its planned advantages. Now work has turned to the compiler itself, and, yes, it's disappointing the exceptions being thrown. 

I know many developers like yourself are eager to start growing the Scala.NET ecosystem, but more work is needed in the compiler. The good news is that we'll get faster to Scala.NET now that other pieces are in place. 


Miguel 





Peter C. Chapin

unread,
Feb 12, 2011, 9:01:58 AM2/12/11
to scala...@googlegroups.com
On Sat, 12 Feb 2011, Miguel Garcia wrote:

> I know many developers like yourself are eager to start growing the
> Scala.NET ecosystem, but more work is needed in the compiler. The good
> news is that we'll get faster to Scala.NET now that other pieces are in
> place.

Thanks for the information. I do understand that it takes time for these
things to come together and I appreciate all the work you (and others) have
done on it. It's great the hear that development on Scala.NET is moving
forward. In the meantime I'll add myself to the list of developers who are
interested in using the technology once it is ready.

Thanks again!
Peter

Reply all
Reply to author
Forward
0 new messages