| Commit message (Collapse) | Author | Age | Files | Lines |
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Sealed abstract classes (like `List`) have a primary constructor, public
by default. It can never be called by external code but it shows up in
the scaladoc as a nice `new List()` construtor...
If a class is only abstract, the constructor is still useful because
people can subclass and call it. If it is only sealed (i.e. effectively final),
then it is the normal constructor of a final class. But sealed *and*
abstract makes documenting the constructor useless.
This should remove the misleading constructors of `List`, `Double`,
`Option` and others from the scaladoc.
|
|
|
|
|
|
| |
In scaladoc, this turns exceptions in @throws tags into links
(when it can find the target exception), instead of just showing
the name.
|
|
|
|
| |
as its docs say it does.
|
|\
| |
| | |
scaladoc: fixed code block indentation normalization
|
| | |
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
Parsing "[[http://foo.bar link title]]" stops at the first whitespace.
This breaks pretty badly in:
[[http://foo.bar
link title]]
It stops after "link", interprets what it parsed as a link to a member,
obviously fails, and then just ouputs "title".
It should at least return a proper error, or, even better, just allow a
newline between the target and title. I went for the latter.
|
|\ \
| | |
| | |
| | |
| | | |
Conflicts:
src/library/scala/util/matching/Regex.scala
|
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
This is currently pretty borken,
but let's at least not clutter innocent
interfaces with this functionality.
Moved `comment` (as `signalParsedDocComment`) next to
the other hook methods in `Global`. For now, it calls
the old `reporter.comment` hook method.
As soon as the IDE is refactored to receive comments properly,
the deprecated `Reporter#comment` method can be removed.
|
| | |
| | |
| | |
| | |
| | |
| | | |
fix encoding to show euro-sign correctly.
(cherry picked from commit 13054daa658484df30b71447dbe684f475537252)
|
|/ /
| |
| |
| | |
(cherry picked from commit 68b16a0992877b4ebbb7c967804edbb72c05ceb5)
|
|\ \
| | |
| | | |
SI-8525 -Xlint:nowarn-missing-interpolator
|
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
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-8557 make scaladoc normalize paths of external jars.
|
| | |
| | |
| | |
| | |
| | |
| | | |
Scaladoc compares (string representations of) the paths from
-doc-external-doc and the paths form `sym.underlyingSource`.
We now normalize on both ends before comparing them.
|
| |/
|/|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
Inline the forwarders from CompilationUnit, which should not affect behavior.
Since all forwarders lead to global.reporter, don't first navigate
to a compilation unit, only to then forward back to global.reporter.
The cleanup in the previous commits revealed a ton of confusion
regarding how to report an error.
This was a mechanical search/replace, which has low potential for messing
things up, since the list of available methods are disjoint between
`reporter` and `currentRun.reporting`. The changes involving `typer.context`
were done previously.
Essentially, there are three ways to report:
- via typer.context, so that reporting can be silenced (buffered)
- via global.currentRun.reporting, which summarizes (e.g., deprecation)
- via global.reporter, which is (mostly) stateless and straightforward.
Ideally, these should all just go through `global.currentRun.reporting`,
with the typing context changing that reporter to buffer where necessary.
After the refactor, these are the ways in which we report (outside of typer):
- reporter.comment
- reporter.echo
- reporter.error
- reporter.warning
- currentRun.reporting.deprecationWarning
- currentRun.reporting.incompleteHandled
- currentRun.reporting.incompleteInputError
- currentRun.reporting.inlinerWarning
- currentRun.reporting.uncheckedWarning
Before:
- c.cunit.error
- c.enclosingUnit.deprecationWarning
- context.unit.error
- context.unit.warning
- csymCompUnit.warning
- cunit.error
- cunit.warning
- currentClass.cunit.warning
- currentIClazz.cunit.inlinerWarning
- currentRun.currentUnit.error
- currentRun.reporting
- currentUnit.deprecationWarning
- currentUnit.error
- currentUnit.warning
- getContext.unit.warning
- getCurrentCUnit.error
- global.currentUnit.uncheckedWarning
- global.currentUnit.warning
- global.reporter
- icls.cunit.warning
- item.cunit.warning
- reporter.comment
- reporter.echo
- reporter.error
- reporter.warning
- reporting.deprecationWarning
- reporting.incompleteHandled
- reporting.incompleteInputError
- reporting.inlinerWarning
- reporting.uncheckedWarning
- typer.context.unit.warning
- unit.deprecationWarning
- unit.echo
- unit.error
- unit.incompleteHandled
- unit.incompleteInputError
- unit.uncheckedWarning
- unit.warning
- v1.cunit.warning
All these methods ended up calling a method on `global.reporter`
or on `global.currentRun.reporting` (their interfaces are disjoint).
Also clean up `TypeDiagnostics`: inline nearly-single-use private methods.
|
| | |
|
| |
| |
| |
| |
| |
| |
| |
| |
| | |
The first sentence of a Scaladoc comment is parsed as the summary.
However, this was breaking of the sentence at the first `.`, even
if that was immediately followed by another character.
This commit only considers a period followed by whitespace, EOL or
EOF as the end of a sentence.
|
|/ |
|
|\
| |
| | |
SI-8514 Remove scaladoc html inconsistencies
|
| |
| |
| |
| | |
Some classes only got inline comments instead of getting the full comment.
|
|/ |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
The refactoring in aedec1980 mistakenly used the non-silent
typer to typecheck the use cases. It temptingly had the desired
type (`ScalaDocAnalyzer`), but sadly the wrong properties (it will
report errors, rather than buffer.)
This meant that "symbol not found" errors in use cases would prevent
Scaladoc generation.
This commit introduces a little downcast on the silent typer.
A more principled approach would be to go through the rigmarole
of the virtual class pattern for `Analzyer.Typer`, but that will
have to remain work for another day.
|
| |
|
|
|
|
|
|
|
|
|
|
| |
To support the established pattern for disabling it for
an compilation unit.
Update scaladoc's knowledge of our "typeclasses".
Leave a `private[scala]` version of `StringAdd` (public in bytecode)
to ensure binary compatibility with 2.11.0-M8 for partest.
|
| |
|
|
|
|
|
|
| |
Macros are now prettier in scaladoc, by
- hiding the `macroImpl` annotation
- showing the `macro` modifier in front
|
| |
|
| |
|
|
|
|
|
|
|
| |
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.
|
|
|
|
|
|
| |
Calling position factories rather than instantiating these
particular classes. Not calling deprecated methods. Added a few
position combinator methods.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Scaladoc renders tuple and function types with the syntactic sugar.
To do so, it was using `isFunctionType` and `isTupleType`. Internally,
these methods dealias, so one can't simply take the type arguments
from the given type to get the element types of the tuple.
In ac96200c92, a Scaladoc crasher in this area was resolved by
normalizing a type before extracting Tuple type arguments.
Similar code already existed in the handling of FunctionTypes.
This commit goes in the opposite direction, and instead queries
the `direct` versions of those methods, which do not perform
dealiasing.
Conseqeuently, the type aliases that appear in the source code
signatures for members will be rendered as such in Scaladoc.
Which seems like an improvement.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
One last flurry with the broom before I leave you slobs to code
in your own filth. Eliminated all the trailing whitespace I
could manage, with special prejudice reserved for the test cases
which depended on the preservation of trailing whitespace.
Was reminded I cannot figure out how to eliminate the trailing
space on the "scala> " prompt in repl transcripts. At least
reduced the number of such empty prompts by trimming transcript
code on the way in.
Routed ConsoleReporter's "printMessage" through a trailing
whitespace stripping method which might help futureproof
against the future of whitespace diseases. Deleted the up-to-40
lines of trailing whitespace found in various library files.
It seems like only yesterday we performed whitespace surgery
on the whole repo. Clearly it doesn't stick very well. I suggest
it would work better to enforce a few requirements on the way in.
|
|
|
|
|
| |
in various places. This includes actors, compiler (mostly some new
macro parts) continuations, partest, scaladoc, scalap.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
I added a language.existential import to LazyCombiner.scala which
should not be necessary, but causes a spurious warning otherwise:
scala/src/library/scala/collection/parallel/mutable/LazyCombiner.scala:33:
warning: the existential type
scala.collection.parallel.mutable.LazyCombiner[_$1,_$2,_$3] forSome {
type _$1; type _$2; type _$3 <: scala.collection.generic.Growable[_$1] with scala.collection.generic.Sizing },
which cannot be expressed by wildcards, should be enabled by making the implicit value scala.language.existentials visible.
if (other.isInstanceOf[LazyCombiner[_, _, _]]) {
^
I created ticket SI-7750 to track this issue.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
SymbolTable refactoring introduced some TODOs that were supposed
to be addressed after M5 release. The reason I couldn't address
those problems right away was a conflict with our plans to modularize
Scaladoc and interactive. However, we decided to delay that work
until after M5 is released so addressing TODOs is not blocked
anymore.
This commit introduces the following changes:
* Eclipse project definitions for interactive and scaladoc
depend on scala-compiler project so they are builded against
latest version of the compiler (quick) instead of STARR.
This aligns our Eclipse project definitions with build.xml
structure.
* Introduce GlobalSymbolLoaders class which wires dependencies
of SymbolLoaders with assumption of dependency on Global.
* Switch to GlobalSymbolLoaders in BrowsingLoaders,
interactive Global and ScaladocGlobal; this eliminates all
TODO comments introduced before
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
This is rather large commit so I'll first explain the motivation
behind it and then go through all changes in detail explaining
the choices I made.
The motivation behind this refactoring was to make SymbolTable
unit testable. I wanted a lightweight way of initializing
SymbolTable and then writing unit tests for subtyping algorithm,
various functionality related to Symbols, etc.
All of that should be possible by precisely controlling what we
test, e.g., create types and symbols by hand and not have them
defined in source code as we normally do in partest (functional)
tests.
The other motivation was to reduce and clarify dependencies we
have in the compiler. Explicit dependencies lead to cleaner
design. Also, explicit and reduces dependencies help incremental
compilation which is a big problem for us in compiler's code
base at the moment.
One of the challenges I faced during that refactoring was
cyclic dependency between Platform and SymbolLoaders.
Platform depended on `SymbolLoaders.SymbolLoader` because it
would define a root loader. SymbolLoaders depended on Platform
for numerous reasons like deferring decision how to load a given
symbol based on some Platform-specific hooks.
I decided to break that cycle by removing methods related to
symbol loading from Platform interface. One could argue, that
better fix would be to make SymbolLoaders to not depend on Platform
(backend) concept but that would be much bigger refactoring. Also,
we have a new concept for dealing with symbol loading: Mirrors.
For those reasons both `newClassLoader` and `rootLoader`
were dropped from Platform interface.
Note that JavaPlatform still depends on Global so it can
access phases defined in Global to implement `platformPhases`
method.
Both GenICode and BCodeBodyBuilder have some Platform specific
logic that requires casting because pattern matcher doesn't narrow
types to give them a proper refinement. Check the changes for details.
Some logging utilities has been moved from Global to SymbolTable
because they are accessed by SymbolTable. Since Global inherits from
SymbolTable this should be a source compatible change.
The SymbolLoaders has dependency on `compileLate` method defined in Global.
The purpose behind `compileLate` is not clear to me but the dependency looks
a little bit dubious. At least we made that dependency explicit.
ScaladocGlobal and Global defined in interactive has been adapted in a way
that makes them compile both with quick.comp and 2.11.0-M4 so my refactorings
are not blocking the modularization effort.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
ClassfileParser depends on forcing infos during typer phase.
It's not entirely clear why this is needed (git blame doesn't
help much) but I decided to preserve the logic.
Therefore, I introduced an abstract method called
`lookupMemberAtTyperPhaseIfPossible` which preserves the original
semantics but is implemented outside of ClassfileParser so the
ClassfileParser itself doesn't need to depend on typer phase and
phase mutation utilities.
I removed `loaders` override in `test/files/presentation/doc`.
I would have to update it to implement the
`lookupMemberAtTyperPhaseIfPossible` method. However, the override
doesn't seem to be doing anything useful so I just removed it.
|
|\
| |
| | |
Lint-like fixes found by Semmle
|
| | |
|
|/
|
|
|
|
|
| |
tools.cmd.CommandLineParser uses a small hand-rolled parser
TODO: replace partest's usage of scala.tools.nsc.util.CommandLine
by scala.tools.cmd.CommandLine
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
I checked the generated HTML with the validators provided by
http://validator.w3.org/ and http://html5.validator.nu/ to verify that
all issues have been fixed.
Changes:
- Adapt doctype
- Remove processing instructions
- Add alt attributes to image tags
Before that, the output tried to be XHTML 1.1, but failed validation as
attested by both validators mentioned above, making it more likely to
trigger the quirks modes in browsers.
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Optimistically, this is preparation for a day when we don't
let numeric types drift with the winds. Even without the optimism
it's a good idea. It flushed out an undocumented change in
the math package object relative to the methods being forwarded (a
type is widened from what is returned in java) so I documented
the intentionality of it.
Managing type coercions manually is a bit tedious, no doubt,
but it's not tedious enough to warrant abandoning type safety
just because java did it.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
We have lots of core classes for which we need not go through
the symbol to get the type:
ObjectClass.tpe -> ObjectTpe
AnyClass.tpe -> AnyTpe
I updated everything to use the concise/direct version,
and eliminated a bunch of noise where places were calling
typeConstructor, erasedTypeRef, and other different-seeming methods
only to always wind up with the same type they would have received
from sym.tpe. There's only one Object type, before or after erasure,
with or without type arguments.
Calls to typeConstructor were especially damaging because (see
previous commit) it had a tendency to cache a different type than
the type one would find via other means. The two types would
compare =:=, but possibly not == and definitely not eq. (I still
don't understand what == is expected to do with types.)
|
|\
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
* commit 'd93826f278':
Incorporated reviewer feedback.
Incorporated reviewer feedback.
Refactored stabilize.
Eliminated HKmode.
Eliminated RETmode.
Eliminated SNDTRYmode.
Started eliminating modes.
Corralling Modes into a smaller pen.
Conflicts:
src/compiler/scala/tools/nsc/typechecker/Macros.scala
src/compiler/scala/tools/nsc/typechecker/RefChecks.scala
src/compiler/scala/tools/nsc/typechecker/Typers.scala
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
Attempting to reduce the frequency of low-level operations
with modes. I mean stuff like this:
if ((mode & (EXPRmode | LHSmode)) == EXPRmode)
THey don't make those ten line boolean guards any easier
to understand. Hopefully this will lead us toward eliminating
some of the modes entirely, or at least better isolating
their logic rather than having it interspersed at arbitrary
points throughout the typer.
Modes are in their entirety a leaked implementation detail.
Typing a tree requires a tree and optionally an expected type.
It shouldn't require a bucket of state bits. In subsequent
commits I will start eliminating them.
This commit also breaks adapt down into more digestible chunks.
|
| |
| |
| |
| |
| |
| | |
Conflicts:
src/compiler/scala/tools/nsc/typechecker/Implicits.scala
src/reflect/scala/reflect/runtime/JavaMirrors.scala
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
================================================================
Merge commit 'v2.10.1-326-g4f8c306' into merge/v2.10.1-326-g4f8c306-to-master
Conflicts:
src/compiler/scala/tools/nsc/typechecker/SuperAccessors.scala
src/reflect/scala/reflect/runtime/JavaMirrors.scala
================================================================
Merge -s ours 4e64a27 ([nomaster commit range])
================================================================
Merge commit '0ae7e55' into merge/v2.10.1-326-g4f8c306-to-master
Conflicts:
src/compiler/scala/tools/nsc/typechecker/Macros.scala
|
|\ \
| |/
|/| |
This is a cleanup of scaladoc code.
|
| |
| |
| |
| |
| | |
Instead only cache direct subclasses and compute all known subclasses
as a transitive closure.
|
| |
| |
| |
| | |
Also remove private setting not used anymore.
|