| Commit message (Collapse) | Author | Age | Files | Lines |
|
|
|
|
|
|
|
|
|
| |
- 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".
|
|
|
|
|
| |
Keep on scanning if the first entry doesn't yield
a plugin.xml descriptor.
|
|
|
|
|
|
|
|
|
|
| |
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.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
- 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`
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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.
|
|
|
|
|
|
|
|
|
| |
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.
|
|
|
|
|
| |
The argument to `-Xplugin` is now a comma-separated list of paths.
This commit updates the option descriptor and a code comment.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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
```
|
| |
|
|
|
|
|
|
|
|
|
| |
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.
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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?
|
|
|
|
|
|
| |
Some unused private code, unused imports, and points where
an extra pair of parentheses is necessary for scalac to have
confidence in our intentions.
|
|
|
|
|
|
|
| |
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.
|
|
|
|
|
| |
unmoored doc comment" warning when building distribution for
scala itself.
|
|
|
|
| |
With the exception of toString and the odd JavaBean getter.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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!
|
|
|
|
|
|
|
|
|
|
| |
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 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".
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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
```
|
|
|
|
| |
This is the first step of factoring out scala-reflect.jar.
|
| |
|
|
|
|
|
|
|
|
| |
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.
|
| |
|
|
|
|
|
| |
updated man pages, fixed svn props, did some cleanup
|
| |
|
| |
|
|
|
|
|
| |
Warn when the jar file cannot be found when loading a plugin. no review.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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.
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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 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 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 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 related junk.
|
|
|
|
|
|
|
|
|
| |
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.
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
| |
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.)
|
| |
|
|
|
|
|
| |
fixed doArgs (Settings.scala) and loadFrom (Plugin.scala)
|
|
|
|
|
|
|
|
| |
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 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 predating the availability
of lazy vals) to lazy vals. Streamlined some Plugin(s) logic and took
minor advantage of scala.io.
|
| |
|
| |
|
|
|
|
|
| |
removed deprecated warning, updated svn props, cleaned up code
|
|
|
|
|
|
| |
Compiler implementation of SIP 00002 and fixes for tests and other tools
like scaladoc
|
| |
|