How to disable Scala assertions in Eclipse?

I want to work with assertions in a Scala program. The assertions should be turned off for the final version of the program for increasing the performance.

There seem to be two Scala compiler flags enabling this (the first one requires an additional priority):

-Xelide-below
-Xdisable-assertions

However, activating those in the Scala Compiler Properties of my Scala project in Eclipse has no effect: the assertions are still executed.

The small program I used for testing:

object Test {
  def main(args: Array[String]): Unit = {
    assert(false) 
  }
}

I made sure the code is recompiled; I tested different (very high) priorities for -Xelide-below.

I use Eclipse Juno (4.2.0) and the Scala Plugi-In 2.1.0.nightly-2_09-201209040315-cc63a95 together with Scala 2.9.1-1 on a Windows 7 machine.

Answers


To disable assertions you should use Scala Compiler > Advanced > Xdisable-assertions.

Another way to disable them is to pass the option -Xdisable-assertions to Scala Compiler > Additional command line parameters


Need Your Help

CouchDB composite key/view collation not working

couchdb collation composite-key couchapp

I'm trying to get benefits of view collation in CouchDB unsuccessfully, could some one please check what's wrong in my case?