summaryrefslogtreecommitdiff
path: root/src/compiler/scala/tools/nsc/plugins
Commit message (Collapse)AuthorAgeFilesLines
* Reduce deprecations and warningsSimon Ochsenreither2016-08-021-1/+1
|
* Remove unused imports and other minor cleanupsSimon Ochsenreither2015-12-181-3/+1
| | | | | | | | | | - Language imports are preceding other imports - Deleted empty file: InlineErasure - Removed some unused private[parallel] methods in scala/collection/parallel/package.scala This removes hundreds of warnings when compiling with "-Xlint -Ywarn-dead-code -Ywarn-unused -Ywarn-unused-import".
* SI-9370 Xplugin scans plugin path for descriptorSom Snytt2015-06-301-2/+2
| | | | | Keep on scanning if the first entry doesn't yield a plugin.xml descriptor.
* Fix regression in plugin APIJason Zaugg2015-04-081-2/+4
| | | | | | | | | | Removing a call to a deprecated method had the effect of rendering plugins that override that method inoperable. This manifest as a failure to build scala-js in the community build: https://github.com/scala/community-builds/issues/95 Partially reverts d4546fd.
* Removed warningsEECOLOR2015-03-261-3/+3
| | | | | | | | | | | | | | | | | | | | | - Added `since` to deprecation statement - Added unit to parameter list - Removed usage of deprecated method polyType - Replaced deprecated `debugwarn` with `devWarning` - Changed switch statement to if else in order to remove a warning - Switched implementation of `init` and `processOptions` to prevent warning - Replaced deprecated `Console.readLine` with `scala.io.StdIn.readLine` - Replaced deprecated `startOrPoint` with `start` - Replaced deprecated `tpe_=` with `setType` - Replaced deprecated `typeCheck` with `typecheck` - Replaced deprecated `CompilationUnit.warning` with `typer.context.warning` - Replaced deprecated `scala.tools.nsc.util.ScalaClassLoader` with `scala.reflect.internal.util.ScalaClassLoader` - Replaced deprecated `scala.tools.ListOfNil` with `scala.reflect.internal.util.ListOfNil` - Replaced deprecated `scala.tools.utils.ScalaClassLoader` with `scala.reflect.internal.util.ScalaClassLoader` - Replaced deprecated `emptyValDef` with `noSelfType` - In `BoxesRunTime` removed unused method and commented out unused values. Did not delete to keep a reference to the values. If they are deleted people might wonder why `1` and `2` are not used. - Replaced deprecated `scala.tools.nsc.util.AbstractFileClassLoader` with `scala.reflect.internal.util.AbstractFileClassLoader`
* Cleanup and refactoring - semicolons, unused or commented out codempociecha2014-12-051-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | This commit contains some minor changes made by the way when implementing flat classpath. Sample JUnit test that shows that all pieces of JUnit infrastructure work correctly now uses assert method form JUnit as it should do from the beginning. I removed commented out lines which were obvious to me. In the case of less obvious commented out lines I added TODOs as someone should look at such places some day and clean them up. I removed also some unnecessary semicolons and unused imports. Many string concatenations using + have been changed to string interpolation. There's removed unused, private walkIterator method from ZipArchive. It seems that it was unused since this commit: https://github.com/scala/scala/commit/9d4994b96c77d914687433586eb6d1f9e49c520f However, I had to add an exception for the compatibility checker because it was complaining about this change. I made some trivial corrections/optimisations like use 'findClassFile' method instead of 'findClass' in combination with 'binary' to find the class file.
* SI-8525 No anonymous lintSom Snytt2014-07-101-1/+1
| | | | | | | | | Turn anonymous references to `settings.lint` into named settings. After that, trust to Adriaan to make them filterable. There are a few remaining top-level -Y lint warnings that are deprecated.
* SI-4841 CLI help update for -XpluginSom Snytt2014-01-071-2/+3
| | | | | The argument to `-Xplugin` is now a comma-separated list of paths. This commit updates the option descriptor and a code comment.
* SI-4841 Plugins get a class pathSom Snytt2013-12-063-52/+77
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Let -Xplugin specify a class path (or multiple of them). Each entry can be a jar or dir, and the first entry to supply a plugin descriptor defines the plugin to load. If no plugin is found on the path, then issue a warning if `-Xdev`. This honors the legacy silent treatment (which scala-ide tests for). In the proposed scheme, each plugin gets a class loader so that plugins are isolated from each other. Presumably, if compiler plugins were a rich ecosystem, in which shared dependencies were required in incompatible versions, this would have become a requirement by now. (Updated with a `DirectTest` that uses two plugins, but keeping the following as documentation.) Partest can't do multiple plugins yet, but this is what it looks like: ``` skalac -Xplugin:sample.jar:useful.jar:util,needful.jar:another.jar:util,needful.jar:util:exploded -Xplugin-require:sample,another,other foo.scala skalac -Xplugin:sample.jar:useful.jar:util,needful.jar:another.jar:util,needful.jar:util:exploded -Xplugin-require:sample,other -Xplugin-disable:another foo.scala skalac -Xplugin:sample.jar:useful.jar:util,sample.jar:useful.jar:util -Xplugin-require:sample foo.scala ``` The manual test shows three plugins with various permutations of jars and dirs. The manual test demonstrates that plugins only see classes on their class path: ``` Initializing test.plugins.SamplePlugin needful.Needful? Failure(java.lang.ClassNotFoundException: needful.Needful) useful.Useful? Success(class useful.Useful) Initializing more.plugins.AnotherPlugin needful.Needful? Success(class needful.Needful) useful.Useful? Failure(java.lang.ClassNotFoundException: useful.Useful) Initializing other.plugins.OtherPlugin ``` Disabling a plugin results in a message instead of silent suppression: ``` Disabling plugin another ``` The duplicate plugin class test must still be honored: ``` Ignoring duplicate plugin sample (test.plugins.SamplePlugin) Initializing test.plugins.SamplePlugin needful.Needful? Failure(java.lang.ClassNotFoundException: needful.Needful) useful.Useful? Success(class useful.Useful) ``` If the path is bad, then missing classes will report which plugin induced the error: ``` Error: class not found: util/Probe required by test.plugins.SamplePlugin Error: class not found: util/Probe required by more.plugins.AnotherPlugin Initializing other.plugins.OtherPlugin needful.Needful? Success(class needful.Needful) useful.Useful? Failure(java.lang.ClassNotFoundException: useful.Useful) error: Missing required plugin: sample error: Missing required plugin: another two errors found ```
* deprecate Pair and TripleDen Shabalin2013-11-201-1/+1
|
* SI-7622 Plugins can be not enabledSom Snytt2013-08-213-26/+34
| | | | | | | | | Plugins can interrogate options and declare themselves not enabled. The plugin itself can return false from its init if the options do not compute. A plugin phase component can declare itself not enabled, same as an internal phase. No one exploits this facility at this commit.
* Remove dependency on xml in plugin loading.Adriaan Moors2013-06-202-39/+31
|
* SI-7494 Each plugin must only be instantiated once.Som Snytt2013-05-181-7/+4
| | | | | | | | | | | | | | | | | | | | | The old behavior was that Plugin.loadAllFrom took a distinct list of plugin locations. The broken behavior incorrectly punted to the pruning algorithm in Plugins.loadPlugins$pick. The new behavior is to distinctify the list of class names to load. This is more robust; under the old scheme, specifying the continuations.jar under two file names would fail as described in the ticket. Pruning a plugin by disabling (-Xplugin-disable) or because it steps on someone else's phase name suffers the same defect. There is no way to tell the plugin it has been benched. And you know that global I gave you? Can I have it back?
* Eliminate a pile of -Xlint warnings.Paul Phillips2013-04-231-3/+2
| | | | | | Some unused private code, unused imports, and points where an extra pair of parentheses is necessary for scalac to have confidence in our intentions.
* SI-7261 Implicit conversion of BooleanSetting to Boolean and BooleanFlagSom Snytt2013-03-271-1/+1
| | | | | | | This commit shortens expressions of the form `if (settings.debug.value)` to `if (settings.debug)` for various settings. Rarely, the setting is supplied as a method argument. The conversion is not employed in simple definitions where the Boolean type would have to be specified.
* Doc -> C-style comments for local symbols to avoid "discardingEugene Vigdorchik2013-03-211-3/+3
| | | | | unmoored doc comment" warning when building distribution for scala itself.
* Be explicit about empty param list calls.Jason Zaugg2013-02-241-2/+2
| | | | With the exception of toString and the odd JavaBean getter.
* PluginComponent contributes description to -Xshow-phases.Som Snytt2012-12-184-99/+99
| | | | | | | | | | | | | | | In Global, SubComponent is called a phase descriptor, but it doesn't actually have a description. (Phase itself does.) This fix adds a description to PluginComponent so that plugins can describe what they do in -Xshow-phases. Elliptical descriptions Exploded archives Plugged-in partest Roundup at the Little h!
* Removing ancient comments and pointless comments.Paul Phillips2012-11-192-2/+2
| | | | | | | | | | Translating <code></code> into backticks. Removed the "@param tree ..." blocks which have been taunting me for half a decade now. Removed commented-out blocks of code which had been sitting there for two years or more.
* A few straggling unused imports.Paul Phillips2012-11-071-1/+1
|
* Removed unused imports.Paul Phillips2012-11-061-4/+1
| | | | | | | | | A dizzying number of unused imports, limited to files in src/compiler. I especially like that the unused import option (not quite ready for checkin itself) finds places where feature implicits have been imported which are no longer necessary, e.g. this commit includes half a dozen removals of "import scala.language.implicitConversions".
* Brings all copyrights (in comments) up-to-date, from 2011/12 to 2013Heather Miller2012-11-025-5/+5
|
* update and normalize copyright noticeAdriaan Moors2012-08-075-5/+5
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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 ```
* moves positions to scala.reflect.internal.utilEugene Burmako2012-06-081-2/+3
| | | | This is the first step of factoring out scala-reflect.jar.
* Enabling postfix ops feature warning, and working on libs to avoid them.Martin Odersky2012-04-122-3/+3
|
* Use context for buffering errors that cannot/shouldn't be reported in the ↵Hubert Plociniczak2012-01-251-1/+1
| | | | | | | | given moment (instead of throwing type errors). This avoids previous problems where we were creating fake error trees in some incorrect places like in type completers in Namers etc. Implicits relied heavily on type errors being thrown but performance should stay the same due to some explicit checks/returns. Some of the problems involved how ambiguous error messages were collected/reported because it was very random (similarly for divergent implicits). This should be more explicit now. Reduced the number of unnecessary cyclic references being thrown (apart from those in Symbols/Types which don't have a context and need to stay for now as is). Review by @paulp, @odersky.
* Removed special comments on Martin's requestmichelou2011-09-292-57/+2
|
* updated man pages, fixed svn props, did some cl...michelou2011-09-251-7/+55
| | | | | updated man pages, fixed svn props, did some cleanup
* updated scaladoc comments, did some cleanupmichelou2011-09-131-16/+18
|
* remove now redundant check (see #4426).Hubert Plociniczak2011-04-291-6/+2
|
* Warn when the jar file cannot be found when loa...Iulian Dragos2011-04-131-1/+3
| | | | | Warn when the jar file cannot be found when loading a plugin. no review.
* Wanting to deprecate -make, first I had to writ...Paul Phillips2011-03-301-1/+1
| | | | | | | | | | | | | | | 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.
* Updated copyright notices to 2011Antonio Cunei2011-01-205-5/+5
|
* Added some infrastructure for tracking and disp...Paul Phillips2010-12-181-2/+6
| | | | | | | | | | | | | | | | | | | | Added some infrastructure for tracking and displaying information. Used it to generate phase timing tables. Couldn't bring myself to add another option so it's temporarily behind a system property until I sort out the output options. % scalac -Dscala.timings foo.scala // or: ant -Djvm.opts="-Dscala.timings" [...] phase id ms share -------------- -- ---- ----- typer 4 5816 44.94 mixin 20 1220 9.43 specialize 13 1179 9.11 erasure 15 916 7.08 ...etc. No review.
* When was the last time -Xcheckinit was run? It ...Paul Phillips2010-12-111-2/+1
| | | | | | | | | | When was the last time -Xcheckinit was run? It must have been a long time. All these changes are to address bugs revealed by -Xcheckinit, mostly in test cases, some in the compiler. I'm guessing the partest -Xcheckinit runs are hanging the first time they run into a failure, so if it starts "working" again after this commit don't get too confident. No review.
* Mopping up after the deprecation of exit and er...Paul Phillips2010-12-051-3/+3
| | | | | | | | | | | | | | Mopping up after the deprecation of exit and error. It is decidedly non-trivial (at least for the IDE-impaired) to be completely sure of which error function was being called when there were about twenty with the same signature in trunk and they are being variously inherited, imported, shadowed, etc. So although I was careful, the possibility exists that something is now calling a different "error" function than before. Caveat programmer. (And let's all make it our policy not to name anything "error" or "exit" from here on out....) No review.
* Routed all places in trunk which look for jar f...Paul Phillips2010-07-021-1/+1
| | | | | | | | | | Routed all places in trunk which look for jar files through the same function, and then changed the default behavior to recognize jars even if they don't have a *.jar extension by squinting at the first few bytes of the file. Closes #3000 (THE AMAZING TICKET 3000!), review by phaller.
* Removed more than 3400 svn '$Id' keywords and r...Antonio Cunei2010-05-125-5/+0
| | | | | Removed more than 3400 svn '$Id' keywords and related junk.
* As a brief diversion from real work, implemente...Paul Phillips2010-04-061-2/+2
| | | | | | | | | As a brief diversion from real work, implemented Damerau–Levenshtein and ran it on trunk to elicit obvious misspellings. Unfortunately they're mostly in places like compiler comments which real people never see, but I fixed them anyway. All those English Lit majors who peruse our sources are sure to be pleased. No review.
* fixed double-loading of plugins.Tiark Rompf2010-03-252-6/+6
|
* Took a swing at sorting out sorting.Paul Phillips2010-02-021-2/+2
| | | | | | | | | | | | rewriting the Sorting methods to accept Orderings and adding a sorted method to SeqLike, because we should all be pretty tired of writing ".sortWith(_ < _)" by now. I think it should be called "sort", not "sorted", but that refuses to coexist gracefully with the deprecated sort in List. Review by moors (chosen pretty arbitrarily, someone at epfl should review it but I don't know who deserves the nomination.)
* Updated copyright notices to 2010Antonio Cunei2009-12-075-5/+5
|
* fixed doArgs (Settings.scala) and loadFrom (Plu...michelou2009-09-221-17/+20
| | | | | fixed doArgs (Settings.scala) and loadFrom (Plugin.scala)
* Resurrected the former contents of scala.io in ...Paul Phillips2009-09-112-141/+96
| | | | | | | | Resurrected the former contents of scala.io in their new home, scala.tools.nsc.io, and equipped them with fake beards and handlebar moustaches. Also restored the reverted bits of the compiler which had been taking advantage of them.
* Reverts scala.io.* to its natural state, and th...Paul Phillips2009-09-072-96/+141
| | | | | | | | Reverts scala.io.* to its natural state, and the rest of trunk to using java.io.File. Anyone who wants to salvage any usable bits is of course welcome to do so, so long as they also assume responsibility for those bits.
* Converts some "lazy vals by hand" (probably pre...Paul Phillips2009-09-062-141/+96
| | | | | | | Converts some "lazy vals by hand" (probably predating the availability of lazy vals) to lazy vals. Streamlined some Plugin(s) logic and took minor advantage of scala.io.
* switch to unnested packages.Martin Odersky2009-07-245-5/+10
|
* massive new collections checkin.Martin Odersky2009-05-081-0/+2
|
* removed deprecated warning, updated svn props, ...michelou2009-03-102-11/+6
| | | | | removed deprecated warning, updated svn props, cleaned up code
* Compiler implementation of SIP 00002 and fixes ...nielsen2009-02-052-46/+26
| | | | | | Compiler implementation of SIP 00002 and fixes for tests and other tools like scaladoc