summaryrefslogtreecommitdiff
path: root/src/repl
Commit message (Collapse)AuthorAgeFilesLines
...
| * SI-6502 Moving methods concerned with the state of Global from IMain to GlobalHeather Miller2014-11-051-33/+1
| |
| * Addresses review commentsHeather Miller2014-11-051-27/+8
| |
| * SI-6502 Addresses comments by @som-snyttHeather Miller2014-11-051-9/+3
| |
| * SI-6502 Addresses @som-snytt's feedbackHeather Miller2014-11-051-4/+3
| |
| * SI-6502 Addressing review commentsHeather Miller2014-11-051-9/+19
| |
| * SI-6502 Reenables loading jars into the running REPL (regression in 2.10)Heather Miller2014-11-052-8/+119
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Fixes SI-6502, reenables loading jars into the running REPL (regression in 2.10). This PR allows adding a jar to the compile and runtime classpaths without resetting the REPL state (crucial for Spark SPARK-3257). This follows the lead taken by @som-snytt in PR #3986, which differentiates two jar-loading behaviors (muddled by cp): - adding jars and replaying REPL expressions (using replay) - adding jars without resetting the REPL (deprecated cp, introduced require) This PR implements require (left unimplemented in #3986) This PR is a simplification of a similar approach taken by @gkossakowski in #3884. In this attempt, we check first to make sure that a jar is only added if it only contains new classes/traits/objects, otherwise we emit an error. This differs from the old invalidation approach which also tracked deleted classpath entries.
* | Merge pull request #4058 from som-snytt/issue/verbose-loadLukas Rytz2014-11-073-34/+64
|\ \ | |/ |/| SI-8922 REPL load -v
| * SI-8922 REPL load -vSom Snytt2014-11-043-34/+64
| | | | | | | | | | | | | | | | | | | | | | | | | | Verbose mode causes the familiar prompt and line echo so you can see what you just loaded. The quit message is pushed up a level in the process loop. This has the huge payoff that if you start the repl and immediately hit ctl-D, you don't have to wait for the compiler to init (yawn) before you get a shell prompt back.
* | SI-8898 javap -fun under new style lambdasSom Snytt2014-11-043-143/+252
|/ | | | | | | | | | | | | | | To support both -Ydelambdafy strategies, look for both inline (anonfun) and method (lambda) closure classes. For method (lambda) style, use the anonfun method that is invoked by the accessor. Also, the output of javap must be captured eagerly for filtering for the current target method. If the user asks for a module, e.g., `Foo$`, don't yield results for companion class, but for `Foo`, do yield companion module results. Just because.
* Merge pull request #3993 from puffnfresh/feature/color-replGrzegorz Kossakowski2014-10-094-4/+48
|\ | | | | Color REPL under -Dscala.color
| * Use color REPL after writing a defBrian McKenna2014-10-071-10/+19
| |
| * Add color to severity in REPL reporterBrian McKenna2014-09-241-0/+18
| | | | | | | | | | * Errors are red * Warnings are yellow
| * Color REPL under -Dscala.colorBrian McKenna2014-09-213-2/+19
| | | | | | | | | | | | | | | | | | | | We already use -Dscala.color when using -Ytyper-debug This tries to reuse the colors chosen from the debug flag: * Bold blue for vals (e.g. "res0") * Bold green for types (e.g. "Int") * Magenta for the shell prompt (e.g. "scala>")
* | Merge pull request #4030 from som-snytt/issue/8843Grzegorz Kossakowski2014-10-071-9/+25
|\ \ | | | | | | SI-8843 AbsFileCL acts like a CL
| * | SI-8843 AbsFileCL acts like a CLSom Snytt2014-10-061-9/+25
| |/ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Let the AbstractFileClassLoader override just the usual suspects. Normal delegation behavior should ensue. That's instead of overriding `getResourceAsStream`, which was intended that "The repl classloader now works more like you'd expect a classloader to." (Workaround for "Don't know how to construct an URL for something which exists only in memory.") Also override `findResources` so that `getResources` does the obvious thing, namely, return one iff `getResource` does. The translating class loader for REPL only special-cases `foo.class`: as a fallback, take `foo` as `$line42.$read$something$foo` and try that class file. That's the use case for "works like you'd expect it to." There was a previous fix to ensure `getResource` doesn't take a class name. The convenience behavior, that `classBytes` takes either a class name or a resource path ending in ".class", has been promoted to `ScalaClassLoader`.
* | Merge pull request #3986 from som-snytt/issue/6502-no-cpGrzegorz Kossakowski2014-10-072-63/+49
|\ \ | | | | | | SI-6502 Repl reset/replay take settings args
| * | SI-6502 Repl reset/replay take settings argsSom Snytt2014-09-222-62/+44
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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. ```
| * | SI-6502 Remove cp command as unworkableSom Snytt2014-09-211-1/+5
| |/ | | | | | | | | | | | | | | People expect to change the class path midstream. Let's disabuse them by removing the broken command. The internals are deprecated.
* / Increase REPL startup timeout to avoid test failuresJason Zaugg2014-10-011-1/+1
|/ | | | | | | | | | | | | | | | | | | | | | | | | Under load on Jenkins, we've been seeing: ``` % diff /localhome/jenkins/a/workspace/scala-nightly-auxjvm-2.12.x/jdk/jdk7/label/auxjvm/test/files/run/t4542-run.log /localhome/jenkins/a/workspace/scala-nightly-auxjvm-2.12.x/jdk/jdk7/label/auxjvm/test/files/run/t4542.check @@ -2,75 +2,14 @@ Type in expressions to have them evaluated. Type :help for more information. scala> @deprecated("foooo", "ReplTest version 1.0-FINAL") class Foo() { java.util.concurrent.TimeoutException: Futures timed out after [60 seconds] at scala.concurrent.impl.Promise$DefaultPromise.ready(Promise.scala:219) at scala.concurrent.impl.Promise$DefaultPromise.ready(Promise.scala:153) at scala.concurrent.Await$$anonfun$ready$1.apply(package.scala:95) at scala.concurrent.Await$$anonfun$ready$1.apply(package.scala:95) at scala.concurrent.BlockContext$DefaultBlockContext$.blockOn(BlockContext.scala:53) at scala.concurrent.Await$.ready(package.scala:95) at scala.tools.nsc.interpreter.ILoop.processLine(ILoop.scala:431) at scala.tools.nsc.interpreter.ILoop.loop(ILoop.scala:457) at scala.tools.nsc.interpreter.ILoop$$anonfun$process$1.apply$mcZ$sp(ILoop.scala:875) ``` This commit bumps the timeout up be a factor of ten to try to restore that comforting green glow to https://scala-webapps.epfl.ch/jenkins/view/2.N.x
* SI-7931 fix Dscala.repl.vids and some string interpolation typosAntoine Gourlay2014-09-021-1/+1
| | | | | | | | That nice little `-Dscala.repl.vids` feature regressed in f56f9a3c when a string.format was replaced by string interpolation. The ones in scala-reflect were caught by Xlint (who knew building with Xlint was actually useful...), the other was just luck.
* Merge pull request #3886 from adriaanm/report-filterGrzegorz Kossakowski2014-08-261-1/+1
|\ | | | | part 2 of the big error reporting refactoring
| * Move more parsing hooks out of reporting.Adriaan Moors2014-07-171-1/+1
| | | | | | | | | | | | Create a trait Parsing, which, like Reporting, factors our functionality from Global (aka. "the cake"), that is related to global aspects of configuring parsing.
* | SI-4563 friendlier behavior for Ctrl+D in the REPLAntoine Gourlay2014-07-291-1/+8
|/ | | | | | | | | | | | | Closing the REPL with Ctrl+D does not issue a newline, so the user's prompt displays on the same line as the `scala>` prompt. This is bad. We now force a newline before closing the interpreter, and display `:quit` while we're at it so that people know how to exit the REPL (since `exit` doesn't exist anymore). The tricky part was to only add a newline when the console is interrupted, and *not* when it is closed by a command (like `:quit`), since commands are processed after their text (including newline) has been sent to the console.
* Move reporting logic into Reporting traitAdriaan Moors2014-07-041-2/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Move code from Global/SymbolTable to separate Reporting traits to start carving out an interface in scala.reflect.internal.Reporting, with internals in scala.tools.nsc. Reporting is mixed into the cake. It contains a nested class PerRunReporting. Should do the same for debugging/logging. The idea is that CompilationUnit and Global forward all reporting to Reporter. The Reporting trait contains these forwarders, and PerRunReporting, which accumulates warning state during a run. In the process, I slightly changed the behavior of `globalError` in reflect.internal.SymbolTable: it used to abort, weirdly. I assume that was dummy behavior to avoid introducing an abstract method. It's immediately overridden in Global, and I couldn't find any other subclasses, so I don't think the behavior in SymbolTable was ever observed. Provide necessary hooks for scala.reflect.macros.Parsers#parse. See scala/reflect/macros/contexts/Parsers.scala's parse method, which overrides the reporter to detect when parsing goes wrong. This should be refactored, but that goes beyond the scope of this PR. Don't pop empty macro context stack. (Ran into this while reworking -Xfatal-warnings logic.) Fix -Xfatal-warnings behavior (and check files): it wasn't meant to influence warning reporting, except for emitting one final error; if necessary to fail the compile (when warnings but no errors were reported). Warnings should stay warnings. This was refactored in fbbbb22946, but we soon seem to have relapsed. An hour of gitfu did not lead to where it went wrong. Must've been a merge.
* Unclutter Reporter. Move truncation to ReplReporter.Adriaan Moors2014-07-042-2/+21
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Refactor to reduce the Reporter interface. Working towards minimal interfaces in scala.reflect.internal that can be consumed by sbt/IDE/.... The scala.tools.nsc package is entirely private to the compiler (in principle). A `Reporter` should only be used to inform (info/warning/error). No state. Ideally, we'd move to having only one reporter, whose lifetime is adjusted appropriately (from per-run in general to per-context for type checking, so errors can be buffered -- "silenced" -- during nested type checking calls). Start the clean up by moving truncation to the REPL, since it's not relevant for regular reporting. Perversely, we were checking truncation all the time, even though it's only on during a repl run. (Truncation is now always turned off in the repl under -verbose.) Untangle error resetting on symbols from error reporting (reportAdditionalErrors). This fixes a nice&subtle bug that caused feature warnings to be suppressed under `-Xfatal-warnings`: ``` def reportCompileErrors() { if (!reporter.hasErrors && reporter.hasWarnings && settings.fatalWarnings) globalError("No warnings can be incurred under -Xfatal-warnings.") if (reporter.hasErrors) { ... } else { // will erroneously not get here if // `reporter.hasWarnings && settings.fatalWarnings` // since the `globalError` call above means `reporter.hasErrors`... allConditionalWarnings foreach (_.summarize()) ... } } ``` The second `if`'s condition depends on the `globalError` call in the first `if`...
* Merge pull request #3788 from som-snytt/issue/8494Adriaan Moors2014-07-041-40/+56
|\ | | | | SI-8494 Restore filtering javap output
| * SI-8494 Javap filter includes specializedSom Snytt2014-05-231-8/+13
| | | | | | | | | | | | When filtering javap output, include specialized versions of methods. For anonfuns, in particular, the apply$sp is the method of interest.
| * SI-8494 Restore filtering javap outputSom Snytt2014-05-231-33/+44
| | | | | | | | | | | | | | Regressed in support for new delayedEndPoint, where it must pick what to filter for. `s/claas/klass/` and similar.
* | SI-8503 -version is info settingSom Snytt2014-05-291-65/+63
|/ | | | | | | | | | | And the Scala runner exits with 0 for info settings. Producing the version string is consolidated. The compiler driver uses the default settings hook to short-circuit on -version. That's to avoid creating the compiler; really it should check shouldStopWithInfo first, as the runner does.
* SI-8415 Exception handling in REPL initSom Snytt2014-03-153-4/+15
| | | | | | | | Incremental robustness, and probe for typer phase. The probe would be unnecessary if repl contributed a terminal phase that "requires" whatever it needs; that is checked when the Run is built.
* SI-8370 fixes an infinite loop in repl initEugene Burmako2014-03-071-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Under a weird coincidence of circumstances provided by `sbt console-quick`, new XML parsing logic in compiler plugin initialization could lead to stack overflow errors. Here's the abridged sequence events that led to this unfortunate problem (full description can be found on the JIRA issue page): 1) Initialization of the compiler underlying the REPL would kick off plugin initialization. 2) PluginDescription.fromXML would call into DocumentBuilderFactory, i.e. DocumentBuilderFactory.newInstance.newDocumentBuilder.parse(xml). 3) That thing would call into javax.xml.parsers.SecuritySupport.getResourceAsStream, requesting META-INF/services/javax.xml.parsers.DocumentBuilderFactory. 4) That request would get serviced by TranslatingClassLoader provided by the REPL to expose dynamically compiled code. 5) TranslatingClassLoader would call translatePath that would call into IMain.symbolOfIdent trying to map the requested resource onto one of the classes defined by the REPL (which don't exist yet, because REPL hasn't yet finished initializing). 6) IMain.symbolOfIdent would request IMain.global, which is exactly the instance of the compiler that underlies the REPL, and that's currently being initialized. 7..inf) Repeat until a StackOverflowError.
* some renamingsEugene Burmako2014-02-151-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | It’s almost 1am, so I’m only scratching the surface, mechanistically applying the renames that I’ve written down in my notebook: * typeSignature => info * declarations => decls * nme/tpnme => termNames/typeNames * paramss => paramLists * allOverriddenSymbols => overrides Some explanation is in order so that I don’t get crucified :) 1) No information loss happens when abbreviating `typeSignature` and `declarations`. We already have contractions in a number of our public APIs (e.g. `typeParams`), and I think it’s fine to shorten words as long as people can understand the shortened versions without a background in scalac. 2) I agree with Simon that `nme` and `tpnme` are cryptic. I think it would be thoughtful of us to provide newcomers with better names. To offset the increase in mouthfulness, I’ve moved `MethodSymbol.isConstructor` to `Symbol.isConstructor`, which covers the most popular use case for nme’s. 3) I also agree that putting `paramss` is a lot to ask of our users. The double-“s” convention is very neat, but let’s admit that it’s just weird for the newcomers. I think `paramLists` is a good compromise here. 4) `allOverriddenSymbols` is my personal complaint. I think it’s a mouthful and a shorter name would be a much better fit for the public API.
* establishes scala.reflect.api#internalEugene Burmako2014-02-141-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | Reflection API exhibits a tension inherent to experimental things: on the one hand we want it to grow into a beautiful and robust API, but on the other hand we have to deal with immaturity of underlying mechanisms by providing not very pretty solutions to enable important use cases. In Scala 2.10, which was our first stab at reflection API, we didn't have a systematic approach to dealing with this tension, sometimes exposing too much of internals (e.g. Symbol.deSkolemize) and sometimes exposing too little (e.g. there's still no facility to change owners, to do typing transformations, etc). This resulted in certain confusion with some internal APIs living among public ones, scaring the newcomers, and some internal APIs only available via casting, which requires intimate knowledge of the compiler and breaks compatibility guarantees. This led to creation of the `internal` API module for the reflection API, which provides advanced APIs necessary for macros that push boundaries of the state of the art, clearly demarcating them from the more or less straightforward rest and providing compatibility guarantees on par with the rest of the reflection API. This commit does break source compatibility with reflection API in 2.10, but the next commit is going to introduce a strategy of dealing with that.
* SI-6732 deprecates internal#Symbol.isPackageEugene Burmako2014-02-141-1/+1
| | | | | | | | This is the first step in disentangling api#Symbol.isPackage, which is supposed to return false for package classes, and internal#Symbol.isPackage, which has traditionally being used as a synonym for hasPackageFlag and hence returned true for package classes (unlike isModule which is false for module classes).
* SI-7933 REPL javax.script eval is cached resultRaphael Jolly2014-01-311-17/+10
| | | | | | | The problem is that the repl underneath the script engine evaluates input to val res0..resN, so it is a one shot operation. To allow repetition, compile(script) now returns a CompiledScript object whose eval method can be called any number of times.
* SI-8107: Use Regex.quoteChristoffer Sawicki2013-12-292-7/+6
|
* SI-8027 REPL double tab regressionSom Snytt2013-12-031-3/+2
| | | | | | | | | | | | | | | | | | Where did double tab go? "The shadow knows." The regression was introduced by the last flurry before we were left to wallow in whatever white space remained. Some xs put other xs under erasure. It's clear that somebody's daughter walked into the room and asked for a story, because, shockingly, the case arrows don't line up. We need a plug-in for Jenkins, or I guess Travis, to fail the build if arrows and equals don't align, because it clearly indicates a lapse of some kind.
* Merge pull request #3147 from som-snytt/issue/repl-columnsAdriaan Moors2013-11-254-14/+126
|\ | | | | SI-7969 REPL -C columnar output
| * SI-7969 REPL variable columnar outputSom Snytt2013-11-182-10/+64
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Extend column formatting to make columns only as wide as their widest element. This is similar to what `ls` does. Given the longest and shortest string, which bound the min and max column count, compute the layout for those possible column counts, and choose the minimal row count and minimal column count. The junit test is under pending because it uses expecty. (Edit: updated without expectytations.) Example that really benefits, witness the skinny columns: ``` scala> math. BigDecimal PartiallyOrdered cosh rint BigInt Pi exp round E ScalaNumber expm1 signum Equiv ScalaNumericAnyConversions floor sin Fractional ScalaNumericConversions hypot sinh IEEEremainder abs log sqrt Integral acos log10 tan LowPriorityEquiv asin log1p tanh LowPriorityOrderingImplicits atan max toDegrees Numeric atan2 min toRadians Ordered cbrt package ulp Ordering ceil pow PartialOrdering cos random ``` more
| * SI-7969 Refactor to trait with testSom Snytt2013-11-152-20/+31
| | | | | | | | Make REPL classes testable in junit. Test the Tabulator.
| * SI-7969 REPL -C columnar outputSom Snytt2013-11-144-11/+58
| | | | | | | | | | | | | | | | | | | | | | | | Let `ConsoleReaderHelper.printColumns` print in a vertical orientation (similar to `ls -C`) instead of horizontally (`ls -x`). To support the old behavior, add a property `-Dscala.repl.format=across` where "across" is the presumptive mnemonic for `-x`. The format property also takes value `paged` to turn on pagination, which currently forces single-column output (as does `ls | more`) for simplicity.
* | Merge pull request #3152 from paulp/pr/deprecationsJason Zaugg2013-11-221-1/+2
|\ \ | | | | | | Removing deprecated code.
| * | Removing deprecated code.Paul Phillips2013-11-181-1/+2
| |/ | | | | | | | | Code which has been deprecated since 2.10.0 and which allowed for straightforward removal.
* / deprecate Pair and TripleDen Shabalin2013-11-201-1/+1
|/
* SI-7747 Support class based wrappers clean upSom Snytt2013-11-104-74/+55
| | | | | | | | | | | | | | | | | | | | | | | | | Simplified the code paths to just use one of two `Wrapper` types for textual templating. Simplified the class-based template to use the same `$iw` name for the both the class and the wrapper value. In addition, the $read value is an object extending $read, instead of containing an extra instance field, which keeps paths to values the same for both templates. Both styles trigger loading the value object by referencing the value that immediately wraps the user code, although for the class style, inner vals are eager and it would suffice to load the enclosing `$read` object. The proposed template included extra vals for values imported from history, but this is not necessary since such an import is always a stable path. (Or, counter-example to test is welcome.) The test for t5148 is updated as a side effect. Probably internal APIs don't make good test subjects. Modify -Y option message.
* SI-7747 Support class based wrappers as alternative through switch ↵Prashant Sharma2013-11-104-14/+75
| | | | | | | | -Yrepl-class-based Refactoring to reduce the number of if-else Fix test.
* Collections library tidying and deprecation. Separate parts are listed below.Rex Kerr2013-11-071-3/+7
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Collections library tidying, part one: scripting. Everything in scala.collection.scripting is deprecated now, along with the << method that is implemented in a few other classes. Scripting does not seem used at all, and anyone who did can easily write a wrapper that does the same thing. Deprecated *Proxy collections. The only place proxies were used in the library was in swing.ListView, and that was easy to change to a lazy val. Proxy itself is used in ScalaNumberProxy and such, so it was left undeprecated. Deprecated Synchronized* traits from collections. Synchronizability does not compose well, and it requires careful examination of every method (which has not actually been done). Places where the Scala codebase needs to be fixed (eventually) include: scala.reflect.internal.util.Statistics$QuantMap scala.tools.nsc.interactive.Global (several places) Deprecated LinkedList (including Double- and -Like variants). Interface is idiosyncratic and dangerously low-level. Although some low-level functionality of this sort would be useful, this doesn't seem to be the ideal implementation. Also deprecated the extractFirst method in Queue as it exposes LinkedList. Cannot shift internal representations away from LinkedList at this time because of that method. Deprecated non-finality of several toX collection methods. Improved documentation of most toX collection methods to describe what the expectation is for their behavior. Additionally deprecated overriding of - toIterator in IterableLike (should always forward to iterator) - toTraversable in TraversableLike (should always return self) - toIndexedSeq in immutable.IndexedSeq (should always return self) - toMap in immutable.Map (should always return self) - toSet in immutable.Set (should always return self) Did not do anything with IterableLike.toIterable or Seq/SeqLike.toSeq since for some odd reason immutable.Range overrides those. Deprecated Forwarders from collections. Forwarding, without an automatic mechanism to keep up to date with changes in the forwarded class, is inherently unreliable. Absent a mechanism to keep current, they're deprecated. ListBuffer is the only class in the collections library that uses forwarders, and that functionality can be rolled into ListBuffer itself. Deprecating immutable set/map adaptors. They're a bad idea (barring compiler support) for the same reason that all the other adaptors are a bad idea: they get out of date and probably have a variety of performance bugs. Deprecated inheritance from leaf classes in immutable collections. Inheriting from leaf-classes in immutable collections is rarely a good idea since whenever you use any interesting collections method you'll revert to the original class. Also, the methods are often designed to work with only particular behavior, and an override would be difficult (at best) to make work. Fortunately, people seem to have realized this and there are few to no cases of people extending PagedSeq and TreeSet and the like. Note that in many cases the classes will become sealed not final. Deprecated overriding of methods and inheritance from various mutable collections. Some mutable collections seem unsuited for overriding since to override anything interesting you would need vast knowledge of internal data structures and/or access to private methods. These include - ArrayBuilder.ofX classes. - ArrayOps - Some methods of BitSet (moved others from private to protected final) - Some methods of HashTable and FlatHashTable - Some methods of HashMap and HashSet (esp += and -= which just forward) - Some methods of other maps and sets (LinkedHashX, ListMap, TreeSet) - PriorityQueue - UnrolledBuffer This is a somewhat aggressive deprecation, the theory being better to try it out now and back off if it's too much than not attempt the change and be stuck with collections that can neither be safely inherited nor have implementation details changed. Note that I have made no changes--in this commit--which would cause deprecation warnings in any of the Scala projects available on Maven (at least as gathered by Adriaan). There are deprecation warnings induced within the library (esp. for classes/traits that should become static) and the compiler. I have not attempted to fix all the deprecations in the compiler as some of them touch the IDE API (but these mostly involved Synchronized which is inherently unsafe, so this should be fixed eventually in coordination with the IDE code base(s)). Updated test checks to include new deprecations. Used a higher level implementation for messages in JavapClass.
* Merge pull request #3042 from gourlaysama/t7634-repl-sh-is-brokenAdriaan Moors2013-11-071-1/+1
|\ | | | | SI-7634 resurrect the REPL's :sh command
| * SI-7634 resurrect the REPL's :sh commandAntoine Gourlay2013-11-061-1/+1
| | | | | | | | | | | | ProcessResult had a companion object in 2.10 that somehow disappeared in 2.11. It only called "new ProcessResult(...)", so the REPL might just as well do that.
* | Add a skeletal Delambdafy phase.James Iry2013-11-011-1/+2
|/ | | | | | This commit adds a do-nothing phase called "Delambdafy" that will eventually be responsible for doing the final translation of lambdas into classes.