| Commit message (Collapse) | Author | Age | Files | Lines |
|\ |
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
I imagine these date back to old Subversion days and are probably the
result of inadvertent commits from Windows users with vcs client
configs.
having the bit set isn't really harmful most of the time,
but it's just not right, and it makes the files stand out in directory
listings for no reason
|
|\| |
|
| |
| |
| |
| |
| | |
This fix is just for the false negative warning. Probably we can skip
setters entirely, but I'm not 100% sure.
|
| |
| |
| |
| | |
(cherry picked from commit 68b16a0992877b4ebbb7c967804edbb72c05ceb5)
|
| |
| |
| |
| |
| |
| |
| |
| |
| | |
DocComments#expandWiki() had been used by DocComments#toJavaDoc before,
but the latter was removed by #3004.
Based on GitHub (yeah, it's wild guess), we don't have any external
cosumers other than that.
https://github.com/search?l=scala&q=expandWiki+-filename%3ADocComments&ref=searchresults&type=Code&utf8=%E2%9C%93
|
|/ |
|
|
|
|
|
|
|
| |
Most of this was revealed via -Xlint with a flag which assumes
closed world. I can't see how to check the assumes-closed-world
code in without it being an ordeal. I'll leave it in a branch in
case anyone wants to finish the long slog to the merge.
|
| |
|
|
|
|
|
| |
For a bad $variable, the caret is positioned at the variable
in the doc instead of at the symbol being documented.
|
|
|
|
|
| |
unmoored doc comment" warning when building distribution for
scala itself.
|
|\
| |
| |
| |
| |
| |
| |
| | |
Resurrect some undead code from 373ded2ad3 (tuple2Pickler).
Conflicts:
src/compiler/scala/tools/nsc/interactive/CompilerControl.scala
src/compiler/scala/tools/nsc/typechecker/Typers.scala
|
| |
| |
| |
| |
| |
| | |
for given fragments. Don't type-check when forcing doc comments, but rather
do it directly. Test the new functionality as well as better tests for
the old one.
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
What would you prefer?
adaptToMemberWithArgs(tree, qual, name, mode, false, false)
Or:
adaptToMemberWithArgs(tree, qual, name, mode, reportAmbiguous = false, saveErrors = false)
|
| |
| |
| |
| |
| |
| | |
- @param tags whose name drifted from the corresponding parameter
- Remove or complete a few stray stub comments (@param foo ...)
- Use @tparam where appropriate.
|
| |
| |
| |
| |
| |
| | |
Fixes mostly "a int", "a a thing" kind of typos.
Also removes trailing whitespaces, useless empty lines and commented
println() from "test/files/run/ctries-new/iterator.scala".
|
|\|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
* origin/2.10.x: (31 commits)
Implicit vars should have non-implicit setters.
Deprecate `scala.tools.nsc.Phases` because it's dead-code.
scaladoc Template: remove duplicate code and several usages of Option.get.
adds scala-reflect.jar to MIMA in ant
Test showing the absence of a forward reference
update mailmap
Remove dead code from `Global`.
Cleanup MemberLookup. Better explain ambiguous link targets.
typedIdent no longer destroys attachments
fixes incorrect handling of Annotated in lazy copier
simplifies checkBounds
Recurse into instantiations when stripping type vars.
Extract base scaladoc functionality for the IDE.
Expand pattern match position tests.
SI-6288 Remedy ill-positioned extractor binding.
SI-6288 Fix positioning of label jumps
SI-6288 Position argument of unapply
Fixes SI-6758: force LazyAnnnotationInfo for DefDef and TypeDef
SI-6795 Simplify errors related to "abstract override" on type members
SI-6795 Adds negative check for "abstract override" on types in traits
...
Conflicts:
.mailmap
src/compiler/scala/tools/nsc/Global.scala
src/compiler/scala/tools/nsc/ast/DocComments.scala
src/compiler/scala/tools/nsc/doc/base/CommentFactoryBase.scala
src/compiler/scala/tools/nsc/doc/html/page/Source.scala
src/compiler/scala/tools/nsc/doc/html/page/Template.scala
src/compiler/scala/tools/nsc/doc/model/LinkTo.scala
src/compiler/scala/tools/nsc/doc/model/MemberLookup.scala
src/compiler/scala/tools/nsc/doc/model/diagram/DiagramFactory.scala
src/compiler/scala/tools/nsc/transform/SpecializeTypes.scala
src/compiler/scala/tools/nsc/typechecker/Typers.scala
src/reflect/scala/reflect/runtime/JavaMirrors.scala
test/scaladoc/run/links.scala
|
| | |
|
| |
| |
| |
| | |
Nobody is immune!
|
| |
| |
| |
| | |
This reverts commit 951fc3a486.
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
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.
|
| |
| |
| |
| | |
Threw in deprecation warning reduction in src/compiler.
|
|/
|
|
|
|
|
|
|
| |
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
```
|
|
|
|
| |
(blush)
|
|
|
|
|
|
|
|
|
|
| |
Group class members based on their semantic relationship. To do this:
- @group on members, only need to do it for the non-overridden members
- -groups flag passes to scaladoc, groups="on" in ant
- @groupdesc Group Group Description to add descriptions
- @groupname Group New name for group
- @groupprio Group <int> (lower is better)
See test/scaladoc/run/groups.scala for a top-to-bottom example
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
SI-3448 partial fix:
This enables a workaround for the fact that Map takes two type params
while $Coll takes only one. But it doesn't fix the problem though,
as there's one more piece missing from the puzzle - we need to adjust
the `Coll`s in {immutable, mutable, concurrent}.Map to something that
makes sense for the usecase. And that's not possible. But I'm
committing this nevertheless, maybe other projects can benefit from it.
And for SI-3448, the solution lies in automatic usecase generation,
whenever that will be ready.
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
The bug is related to a couple of other annoyances, also fixed:
- usecases without type params were crashing scaladoc due to a change
in the PolyTypes class (not allowing empty tparams list)
- properly getting rid of backticks (even if the link is not valid)
- correct linking for usecases with $Coll = `immutable.Seq`
(the symbol searching algorithm was too of restrictive, now we search
the entire ownerchain - and the empty package at the end)
- give a warning if the type lookup fails
- finally, added a $Coll variable to List, for some reason it wasn't
there and we were getting immutable.Seq as the result of use cases.
|
|
|
|
|
|
| |
This brought to light that Name extends (Int => Char), and
that small convenience was not paying for itself. I updated
the places taking advantage of it to use Name#charAt.
|
|
|
|
| |
This is the first step of factoring out scala-reflect.jar.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
A must read: "SIP: Scala Reflection":
https://docs.google.com/document/d/1Z1VhhNPplbUpaZPIYdc0_EUv5RiGQ2X4oqp0i-vz1qw/edit
Highlights:
* Architecture has undergone a dramatic rehash.
* Universes and mirrors are now separate entities:
universes host reflection artifacts (trees, symbols, types, etc),
mirrors abstract loading of those artifacts (e.g. JavaMirror loads stuff
using a classloader and annotation unpickler, while GlobalMirror uses
internal compiler classreader to achieve the same goal).
* No static reflection mirror is imposed on the user.
One is free to choose between lightweight mirrors and full-blown
classloader-based mirror (read below).
* Public reflection API is split into scala.reflect.base and scala.reflect.api.
The former represents a minimalistic snapshot that is exactly enough to
build reified trees and types. To build, but not to analyze - everything smart
(for example, getting a type signature) is implemented in scala.reflect.api.
* Both reflection domains have their own universe: scala.reflect.basis and
scala.reflect.runtime.universe. The former is super lightweight and doesn't
involve any classloaders, while the latter represents a stripped down compiler.
* Classloader problems from 2.10.0-M3 are solved.
* Exprs and type tags are now bound to a mirror upon creation.
* However there is an easy way to migrate exprs and type tags between mirrors
and even between universes.
* This means that no classloader is imposed on the user of type tags and exprs.
If one doesn't like a classloader that's there (associated with tag's mirror),
one can create a custom mirror and migrate the tag or the expr to it.
* There is a shortcut that works in most cases. Requesting a type tag from
a full-blown universe will create that tag in a mirror that corresponds to
the callsite classloader aka `getClass.getClassLoader`. This imposes no
obligations on the programmer, since Type construction is lazy, so one
can always migrate a tag into a different mirror.
Migration notes for 2.10.0-M3 users:
* Incantations in Predef are gone, some of them have moved to scala.reflect.
* Everything path-dependent requires implicit prefix (for example, to refer
to a type tag, you need to explicitly specify the universe it belongs to,
e.g. reflect.basis.TypeTag or reflect.runtime.universe.TypeTag).
* ArrayTags have been removed, ConcreteTypeTag have been renamed to TypeTags,
TypeTags have been renamed to AbsTypeTags. Look for the reasoning in the
nearby children of this commit. Why not in this commit? Scroll this message
to the very bottom to find out the reason.
* Some of the functions have been renamed or moved around.
The rule of thumb is to look for anything non-trivial in scala.reflect.api.
Some of tree build utils have been moved to Universe.build.
* staticModule and staticClass have been moved from universes to mirrors
* ClassTag.erasure => ClassTag.runtimeClass
* For the sake of purity, type tags no longer have erasures.
Use multiple context bounds (e.g. def foo[T: ru.TypeTag : ClassTag](...) = ...)
if you're interested in having both erasures and types for type parameters.
* reify now rolls back macro applications.
* Runtime evaluation is now explicit, requires import scala.tools.reflect.Eval
and scala-compiler.jar on the classpath.
* Macro context now has separate universe and mirror fields.
* Most of the useful stuff is declared in c.universe,
so be sure to change your "import c.universe._" to "import c.mirror._".
* Due to the changes in expressions and type tags, their regular factories
are now really difficult to use. We acknowledge that macro users need to
frequently create exprs and tags, so we added old-style factories to context.
Bottom line: almost always prepend Expr(...)/TypeTag(...) with "c.".
* Expr.eval has been renamed to Expr.splice.
* Expr.value no longer splices (it can still be used to express cross-stage
path-dependent types as specified in SIP-16).
* c.reifyTree now has a mirror parameter that lets one customize the initial
mirror the resulting Expr will be bound to. If you provide EmptyTree, then
the reifier will automatically pick a reasonable mirror (callsite classloader
mirror for a full-blown universe and rootMirror for a basis universe).
Bottom line: this parameter should be EmptyTree in 99% of cases.
* c.reifyErasure => c.reifyRuntimeClass.
Known issues:
* API is really raw, need your feedback.
* All reflection artifacts are now represented by abstract types.
This means that pattern matching against them will emit unchecked warnings.
Adriaan is working on a patch that will fix that.
WARNING, FELLOW CODE EXPLORER! You have entered a turbulence zone.
For this commit and its nearby parents and children
tests are not guaranteed to work. Things get back to normal only after
the "repairs the tests after the refactoring spree" commit.
Why so weird? These twentish changesets were once parts of a humongous blob,
which spanned 1200 files and 15 kLOC. I did my best to split up the blob,
so that the individual parts of the code compile and make sense in isolation.
However doing the same for tests would be too much work.
|
|
|
|
|
|
|
|
| |
Suggested by Simon in
https://groups.google.com/forum/?hl=en&fromgroups#!topic/scala-internals/z7s1CCRCz74
Now it eliminates backticks and gracefully bails out with an error
message when it can't remove the wiki syntax.
|
| |
|
|
|
|
|
|
|
| |
See https://github.com/VladUreche/scala/tree/feature/doc-implicits for the history.
See https://scala-webapps.epfl.ch/jenkins/view/scaladoc/job/scaladoc-implicits-nightly/ for nightlies.
Many thanks fly out to Adriaan for his help with implicit search!
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Implements SIP 16: Self-cleaning macros: http://bit.ly/wjjXTZ
Features:
* Macro defs
* Reification
* Type tags
* Manifests aliased to type tags
* Extended reflection API
* Several hundred tests
* 1111 changed files
Not yet implemented:
* Reification of refined types
* Expr.value splicing
* Named and default macro expansions
* Intricacies of interaction between macros and implicits
* Emission of debug information for macros (compliant with JSR-45)
Dedicated to Yuri Alekseyevich Gagarin
|
|
|
|
|
|
|
|
| |
One leads to the other.
Easing some more specific typing into Symbols.
Getting a handle on when where and how people rename
symbols to suit their fancies.
|
|
|
|
| |
Also trimmed some cruft which had accrued in recent work.
|
|
|
|
| |
Eliminated the spurious warnings and made the code easier to follow.
|
| |
|
|
|
|
|
|
|
|
| |
Several large helpings of tedium later, fewer strings are being
discarded like so much refuse. Some names now cache a String, but only
"named Names", so it's not very many and they pay for themselves pretty
quickly. Many fewer name-related implicit conversions now taking place.
A number of efficiency related measures.
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
The documents with use cases should be restructured like:
/**
* The full definition, either used with an implicit value or with an explicit one.
*
* Some more explanation on implicits...
*
* @param lost a lost parameter
* @return some integer
*
* @usecase def test(): Int
*
* This takes the implicit value in scope.
*
* Example: `test()`
*
* @usecase def test(explicit: Int): Int
*
* This takes the explicit value passed.
*
* Example: `test(3)`
*/
def test(implicit lost: Int): Int
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Adding some Sets/Maps to perRunCaches, and eliminating ambiguously named
imports.
Did a tour of the compiler adding a few longer-lived mutable structures
to the per-run cache clearing mechanism. Some of these were not a big
threat, but there is (almost) literally no cost to tracking them and the
fewer mutable structures which are created "lone wolf style" the easier
it is to spot the one playing by his own rules.
While I was at it I followed through on long held ambition to eliminate
the importing of highly ambiguous names like "Map" and "HashSet" from
the mutable and immutable packages. I didn't quite manage elimination
but it's pretty close. Something potentially as pernicious which I
didn't do much about is this import:
import scala.collection._
Imagine coming across that one on lines 407 and 474 of a 1271 file.
That's not cool. Some poor future programmer will be on line 1100 and
use "Map[A, B]" in some function and only after the product has shipped
will it be discovered that the signature is wrong and the rocket will
now be crashing into the mountainside straightaway. No review.
|
| |
|
|
|
|
|
|
|
|
|
|
| |
Moved scala.reflect.Chars to scala.reflect.internal.Chars, un-splitting
the scala.reflect package. This is necessary for running in an OSGi
container, such as Eclipse. A package may not be contributed by two
different bundles (in this case the library and the compiler). It may
be moved back when 'scala.reflect' exists only in one place. review by
extempore.
|
|
|
|
|
|
| |
And the remainder of the scala.reflect refactoring (think of it like a
"balloon payment") no review.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
This patch and the several to follow represent an attempt to break
up a very large patch from martin which moves much of the compiler's
typing infrastructure into the library so that we can utilize the same
machinery at runtime that we do at compile time.
Said attempt was not very successful, either at maintaining working
order while committing incrementally or at subdividing the patch into
distinct cohesive units. So let the record show that I tried.
-- some notes on the implementation --
This should not be judged as a finished work, but it's a necessary
opening step for implementing a reflection API without duplicating much
of the compiler.
The files in scala.reflect.common are destined for the library (not the
compiler, where they are now) but have not yet made the leap to manage
compatibility issues.
scala.reflect.generic is likely to be replaced by an alias to
scala.reflect.common.
The fate of scala.reflect.Code and its derived classes is yet to be
determined.
This first patch contains about the only delta against martin's patch,
which is to promote Chars into scala.reflect. Review by odersky.
|
|
|
|
|
| |
Updated a bunch of @deprecated annotations to have a version, no review.
|
| |
|