summaryrefslogtreecommitdiff
path: root/src/compiler/scala/tools/nsc/settings/AbsSettings.scala
Commit message (Collapse)AuthorAgeFilesLines
* Allow all settings to be helpingLukas Rytz2016-09-011-0/+6
|
* SI-6502 Repl reset/replay take settings argsSom Snytt2014-09-221-1/+5
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The reset and replay commands take arbitrary command line args. When settings args are supplied, the compiler is recreated. For uniformity, the settings command performs only the usual arg parsing: use -flag:true instead of +flag, and clearing a setting is promoted to the command line, so that -Xlint: is not an error but clears the flags. ``` scala> maqicode.Test main null <console>:8: error: not found: value maqicode maqicode.Test main null ^ scala> :reset -classpath/a target/scala-2.11/sample_2.11-1.0.jar Resetting interpreter state. Forgetting all expression results and named terms: $intp scala> maqicode.Test main null Hello, world. scala> val i = 42 i: Int = 42 scala> s"$i is the loneliest numbah." res1: String = 42 is the loneliest numbah. scala> :replay -classpath "" Replaying: maqicode.Test main null Hello, world. Replaying: val i = 42 i: Int = 42 Replaying: s"$i is the loneliest numbah." res1: String = 42 is the loneliest numbah. scala> :replay -classpath/a "" Replaying: maqicode.Test main null <console>:8: error: not found: value maqicode maqicode.Test main null ^ Replaying: val i = 42 i: Int = 42 Replaying: s"$i is the loneliest numbah." res1: String = 42 is the loneliest numbah. ``` Clearing a clearable setting: ``` scala> :reset -Xlint:missing-interpolator Resetting interpreter state. scala> { val i = 42 ; "$i is the loneliest numbah." } <console>:8: warning: possible missing interpolator: detected interpolated identifier `$i` { val i = 42 ; "$i is the loneliest numbah." } ^ res0: String = $i is the loneliest numbah. scala> :reset -Xlint: Resetting interpreter state. Forgetting this session history: { val i = 42 ; "$i is the loneliest numbah." } scala> { val i = 42 ; "$i is the loneliest numbah." } res0: String = $i is the loneliest numbah. ```
* Remove code from compiler central.Paul Phillips2012-11-201-10/+1
| | | | | All those old-timey methods whose melodies have become unfashionable.
* Revert "Commenting out unused members."Paul Phillips2012-11-191-8/+8
| | | | This reverts commit 951fc3a486.
* Commenting out unused members.Paul Phillips2012-11-191-8/+8
| | | | | | | | | | | | | | | | | | I want to get this commit into the history because the tests pass here, which demonstrates that every commented out method is not only unnecessary internally but has zero test coverage. Since I know (based on the occasional source code comment, or more often based on knowing something about other source bases) that some of these can't be removed without breaking other things, I want to at least record a snapshot of the identities of all these unused and untested methods. This commit will be reverted; then there will be another commit which removes the subset of these methods which I believe to be removable. The remainder are in great need of tests which exercise the interfaces upon which other repositories depend.
* Address obvious bug in MutableSettings.Paul Phillips2012-11-131-1/+1
| | | | | | If x startsWith "-" it seems unlikely that x == "". Free with purchase: test case with 100 argument permutations. That's only a smidgen shy of infinity.
* Brings all copyrights (in comments) up-to-date, from 2011/12 to 2013Heather Miller2012-11-021-1/+1
|
* Eliminate breaking relative names in source.Paul Phillips2012-09-141-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | These things are killing me. Constructions like package scala.foo.bar.baz import foo.Other DO NOT WORK in general. Such files are not really in the "scala" package, because it is not declared package scala package foo.bar.baz And there is a second problem: using a relative path name means compilation will fail in the presence of a directory of the same name, e.g. % mkdir reflect % scalac src/reflect/scala/reflect/internal/util/Position.scala src/reflect/scala/reflect/internal/util/Position.scala:9: error: object ClassTag is not a member of package reflect import reflect.ClassTag ^ src/reflect/scala/reflect/internal/util/Position.scala:10: error: object base is not a member of package reflect import reflect.base.Attachments ^ As a rule, do not use relative package paths unless you have explicitly imported the path to which you think you are relative. Better yet, don't use them at all. Unfortunately they mostly work because scala variously thinks everything scala.* is in the scala package and/or because you usually aren't bootstrapping and it falls through to an existing version of the class already on the classpath. Making the paths explicit is not a complete solution - in particular, we remain enormously vulnerable to any directory or package called "scala" which isn't ours - but it greatly limts the severity of the problem.
* update and normalize copyright noticeAdriaan Moors2012-08-071-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | These are the regexp replacements performed: Sxcala -> Scala Copyright (\d*) LAMP/EPFL -> Copyright $1-2012 LAMP/EPFL Copyright (\d*)-(\d*)(,?) LAMP/EPFL -> Copyright $1-2012 LAMP/EPFL Copyright (\d*)-(\d*) Scala Solutions and LAMP/EPFL -> Copyright $1-2012 Scala Solutions and LAMP/EPFL \(C\) (\d*)-(\d*) LAMP/EPFL -> (C) $1-2012 LAMP/EPFL Copyright \(c\) (\d*)-(\d*)(.*?)EPFL -> Copyright (c) $1-2012$3EPFL The last one was needed for two HTML-ified copyright notices. Here's the summarized diff: Created using ``` git diff -w | grep ^- | sort | uniq | mate git diff -w | grep ^+ | sort | uniq | mate ``` ``` - <div id="footer">Scala programming documentation. Copyright (c) 2003-2011 <a href="http://www.epfl.ch" target="_top">EPFL</a>, with contributions from <a href="http://typesafe.com" target="_top">Typesafe</a>.</div> - copyright.string=Copyright 2002-2011, LAMP/EPFL - <meta name="Copyright" content="(C) 2002-2011 LAMP/EPFL"/> - * Copyright 2002-2011 LAMP/EPFL - * Copyright 2004-2011 LAMP/EPFL - * Copyright 2005 LAMP/EPFL - * Copyright 2005-2011 LAMP/EPFL - * Copyright 2006-2011 LAMP/EPFL - * Copyright 2007 LAMP/EPFL - * Copyright 2007-2011 LAMP/EPFL - * Copyright 2009-2011 Scala Solutions and LAMP/EPFL - * Copyright 2009-2011 Scxala Solutions and LAMP/EPFL - * Copyright 2010-2011 LAMP/EPFL - * Copyright 2012 LAMP/EPFL -# Copyright 2002-2011, LAMP/EPFL -* Copyright 2005-2011 LAMP/EPFL -/* NSC -- new Scala compiler -- Copyright 2007-2011 LAMP/EPFL */ -rem # Copyright 2002-2011, LAMP/EPFL ``` ``` + <div id="footer">Scala programming documentation. Copyright (c) 2003-2012 <a href="http://www.epfl.ch" target="_top">EPFL</a>, with contributions from <a href="http://typesafe.com" target="_top">Typesafe</a>.</div> + copyright.string=Copyright 2002-2012 LAMP/EPFL + <meta name="Copyright" content="(C) 2002-2012 LAMP/EPFL"/> + * Copyright 2002-2012 LAMP/EPFL + * Copyright 2004-2012 LAMP/EPFL + * Copyright 2005-2012 LAMP/EPFL + * Copyright 2006-2012 LAMP/EPFL + * Copyright 2007-2012 LAMP/EPFL + * Copyright 2009-2012 Scala Solutions and LAMP/EPFL + * Copyright 2010-2012 LAMP/EPFL + * Copyright 2011-2012 LAMP/EPFL +# Copyright 2002-2012 LAMP/EPFL +* Copyright 2005-2012 LAMP/EPFL +/* NSC -- new Scala compiler -- Copyright 2007-2012 LAMP/EPFL */ +rem # Copyright 2002-2012 LAMP/EPFL ```
* Enabling postfix ops feature warning, and working on libs to avoid them.Martin Odersky2012-04-121-1/+1
|
* A couple low impact cleanups/optimizations, no ...Paul Phillips2011-08-011-5/+3
| | | | | A couple low impact cleanups/optimizations, no review.
* Renamed scala.reflect.common to scala.reflect.i...Paul Phillips2011-05-161-1/+1
| | | | | | | Renamed scala.reflect.common to scala.reflect.internal to better emphasize that it is not API. (The brush was overly broad, and some files now need to be rescued from being internal.) No review.
* And the remainder of the scala.reflect refactor...Paul Phillips2011-05-161-7/+1
| | | | | | And the remainder of the scala.reflect refactoring (think of it like a "balloon payment") no review.
* Wanting to deprecate -make, first I had to writ...Paul Phillips2011-03-301-4/+7
| | | | | | | | | | | | | | | 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.
* Undoing some much too hacky code to implement a...Paul Phillips2011-03-161-0/+8
| | | | | | | | | | | | | | | | | | | Undoing some much too hacky code to implement a -jar option and then following wherever that led me. Tangible results include: * much beautified scala -help, including documenting some things never before documented in this plane of existence * an improved Jar abstraction * further systemization of system properties In addition, the jars created by -savecompiled are given the right manifest so the jar is runnable. That means you can: scala -savecompiled bippy.scala arg1 arg2 scala -jar bippy.scala.jar arg1 arg2 And both lines should yield the same result. No review.
* Partial revert of r24325; tryToSetFromPropertyV...Eugene Vigdorchik2011-02-231-1/+6
| | | | | Partial revert of r24325; tryToSetFromPropertyValue is used by Eclipse.
* Changes to startup.Paul Phillips2011-02-221-9/+0
| | | | | | | | | | | | | | default. The -toolcp option now works. -D and -J options are passed as arguments to the runner program as well as to the underlying JVM, because they may be needed for such things as fsc talking to a server compiler. Added a new Settings type for -D and -J options. Deleted some dead settings code. There are dummy settings for -toolcp and -nobootcp so they can be seen in the help output, which needs a big cleanup. No review.
* Created invisible setting to expose empty packa...Paul Phillips2011-02-101-1/+6
| | | | | | | | | Created invisible setting to expose empty package members outside of the empty package, so the repl can use packages without going blind to the empty package. This commit also eliminates a deadlock which hits when the compiler starts logging before a lazy val has pulled its head from the noose. Closes #4228, review by odersky.
* Working on fsc.Paul Phillips2011-02-081-1/+1
| | | | | | | | | for me anyway, with this commit scripts will occasionally reuse a compiler instance, instead of never. Since any tests I write will fail on platforms which aren't mine, there are no tests. I might have to start a platform-specific testing area to break some ice around these huge untested zones. No review.
* Updated copyright notices to 2011Antonio Cunei2011-01-201-1/+1
|
* Cleaned up and brought up to date the help text...Paul Phillips2010-12-051-0/+1
| | | | | | | | Cleaned up and brought up to date the help text for -X and -Y options. Made some enhancements to PhasesSetting, which are documented if you run scalac -X or -Y. (Try it!) Disabled some dead settings and renamed others to reflect their current purpose. No review.
* Workaround for #3462.Paul Phillips2010-05-211-2/+5
| | | | | | | | way it was, but this is the obvious fix for now. Review by odersky (perhaps you could point out where my logic fails, in that I expected the concrete return type of withHelpSyntax to contain a setter for value.)
* Tweaked help output a little further so -Y isn'...Paul Phillips2010-03-261-4/+6
| | | | | | Tweaked help output a little further so -Y isn't visible except to those who consider themselves advanced. No review.
* Remedied accidental obscuring of -X, -Y, and -P...Paul Phillips2010-03-231-1/+1
| | | | | | Remedied accidental obscuring of -X, -Y, and -P in the standard help output. No review.
* More support code for the big partest patch I'm...Paul Phillips2010-03-131-0/+3
| | | | | | More support code for the big partest patch I'm working on to finally finish classpaths for good. No review.
* Unbreak the IDE build following [21086].Miles Sabin2010-03-081-0/+3
|
* More progress toward immutable Settings, and va...Paul Phillips2010-03-081-1/+9
| | | | | | More progress toward immutable Settings, and various cleanups encountered along the way. No review.
* One minute too many trying to figure out where ...Paul Phillips2010-03-071-0/+118
One minute too many trying to figure out where some partest classpath mutation was disappearing on me, and I snapped and started the process of creating an immutable Settings. This commit is for the most part infrastructure to enable its smooth and uneventful entrance. Review by community.