سؤال

At work and at home I use Scala a lot recently. We are using Eclipse as IDE and ScalaTest 2.0 for testing.

Whenever I run a unit test, I get this message:

WARNING: -p has been deprecated and will be reused for a 
different (but still very cool) purpose in ScalaTest 2.0. 
Please change all uses of -p to -R.

My question is two-fold:

  • Why is this message appearing? I already have ScalaTest 2.0, so what is it trying to tell me?
  • Is it possible to get rid of this warning? Our policy is to keep code warning-free, as everyone should try to do. I could not find any information relating to this warning online or on StackOverflow.

For completeness, a code sample:

import org.scalatest.FunSuite

class WarningSpec extends FunSuite {
    test("See if this gives a warning") {
        assert(true)
    }
}
هل كانت مفيدة؟

المحلول

That is likely an unfortunate case of the ScalaTest Eclipse plugin itself using the deprecated Runner command -p to set the run path when running tests. We'll try to reproduce that, and if that's the case, and fix it by using -R instead and update the plugin.

مرخصة بموجب: CC-BY-SA مع الإسناد
لا تنتمي إلى StackOverflow
scroll top