From 5691a3900dd81cfaaa25e618828d854bed277039 Mon Sep 17 00:00:00 2001 From: Paul Phillips Date: Wed, 30 Mar 2011 00:55:20 +0000 Subject: Wanting to deprecate -make, first I had to writ... Wanting to deprecate -make, first I had to write a way to deprecate -make. So there's that, now you can do val s = SomeSetting(...) withDeprecationMessage "don't use this" And it will do the usual deprecation things. And, deprecated -make. And couldn't resist fixing a bug in -make, it would crash if you gave it its own default option (i.e. -make:all.) Let's deprecate more! I also did further cleaning up of our help outputs. Do I smell a pulitzer in the making? No review. --- src/compiler/scala/tools/nsc/settings/MutableSettings.scala | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'src/compiler/scala/tools/nsc/settings/MutableSettings.scala') diff --git a/src/compiler/scala/tools/nsc/settings/MutableSettings.scala b/src/compiler/scala/tools/nsc/settings/MutableSettings.scala index 12b9ef7154..a4a0cd3867 100644 --- a/src/compiler/scala/tools/nsc/settings/MutableSettings.scala +++ b/src/compiler/scala/tools/nsc/settings/MutableSettings.scala @@ -345,6 +345,10 @@ class MutableSettings(val errorFn: String => Unit) extends AbsSettings with Scal private var dependency: Option[(Setting, String)] = None override def dependencies = dependency.toList def dependsOn(s: Setting, value: String): this.type = { dependency = Some((s, value)); this } + + private var _deprecationMessage: Option[String] = None + override def deprecationMessage = _deprecationMessage + def withDeprecationMessage(msg: String): this.type = { _deprecationMessage = Some(msg) ; this } } /** A setting represented by an integer */ -- cgit v1.2.3