summaryrefslogtreecommitdiff
path: root/src/scaladoc
Commit message (Collapse)AuthorAgeFilesLines
* No list of subclasses for Any in scaladoc, it's useless.Antoine Gourlay2014-11-151-1/+1
|
* SI-8948 resurrect the scaladoc for Any/AnyRef/Nothing/Null.Antoine Gourlay2014-11-151-1/+2
| | | | | | | | | | | They disappeared in dc1cd96 when `scala.tools.nsc.doc.DocParser` lost its `override def forScaladoc = true`, which used to trigger whether to parse `DocDef` nodes. This was deprecated in favor of a custom global when scaladoc was modularized out (#2226), but `DocParser` didn't get it since it didn't override `forScaladoc` anymore... I added back `forScaladoc` in `DocParser` for consistency with `ScaladocGlobal`, although it doesn't do anything anymore.
* SI-5730 hide constructors of sealed abstract classes in scaladocAntoine Gourlay2014-11-071-2/+4
| | | | | | | | | | | | | | 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.
* SI-6626 make @throws tags create links to exceptionsAntoine Gourlay2014-11-053-5/+23
| | | | | | In scaladoc, this turns exceptions in @throws tags into links (when it can find the target exception), instead of just showing the name.
* Make Scaladoc actually exit with non-zero exit code in case of errors,David Turner2014-10-041-9/+11
| | | | as its docs say it does.
* Merge pull request #3951 from pawel-wiejacha/2.11.x_SI-8810_fixGrzegorz Kossakowski2014-09-031-42/+8
|\ | | | | scaladoc: fixed code block indentation normalization
| * SI-8810 scaladoc: fixed code block indentation normalizationPaweł Wiejacha2014-09-031-42/+8
| |
* | SI-8113 allow a newline between a link target and titleAntoine Gourlay2014-09-031-2/+6
| | | | | | | | | | | | | | | | | | | | | | | | | | 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.
* | Merge remote-tracking branch 'upstream/2.11.x' into backportsLukas Rytz2014-08-261-3/+4
|\ \ | | | | | | | | | | | | Conflicts: src/library/scala/util/matching/Regex.scala
| * | Regularize `comment` hook methodAdriaan Moors2014-07-171-3/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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.
* | | [backport] Rewrite explanation of doc-source-url option more clearly, and ↵Masato Sogame2014-08-111-1/+1
| | | | | | | | | | | | | | | | | | fix encoding to show euro-sign correctly. (cherry picked from commit 13054daa658484df30b71447dbe684f475537252)
* | | [backport] Update javadoc tag to new scaladoc tags.Masato Sogame2014-08-112-11/+12
|/ / | | | | | | (cherry picked from commit 68b16a0992877b4ebbb7c967804edbb72c05ceb5)
* | Merge pull request #3792 from som-snytt/issue/8525Lukas Rytz2014-07-161-1/+1
|\ \ | | | | | | SI-8525 -Xlint:nowarn-missing-interpolator
| * | 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.
* | | Merge pull request #3883 from gourlaysama/wip/t8557Vlad Ureche2014-07-152-2/+2
|\ \ \ | |/ / |/| | SI-8557 make scaladoc normalize paths of external jars.
| * | SI-8557 make scaladoc normalize paths of external jars.Antoine Gourlay2014-07-152-2/+2
| | | | | | | | | | | | | | | | | | 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.
* | | Rip out reporting indirection from CompilationUnitAdriaan Moors2014-07-041-3/+3
| |/ |/| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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.
* | SI-8292 report error when scaladoc fails to find doclet.Antoine Gourlay2014-07-011-3/+3
| |
* | SI-8672 Better end-of-sentence detection for ScaladocJason Zaugg2014-06-201-1/+11
| | | | | | | | | | | | | | | | | | 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-8591 Scaladoc: Problem with scrolling under Safari on iOSMarcin Kubala2014-05-161-0/+1
|/
* Merge pull request #3685 from VladUreche/issue/8514-masterJason Zaugg2014-04-211-3/+0
|\ | | | | SI-8514 Remove scaladoc html inconsistencies
| * SI-8514 Remove scaladoc html inconsistenciesVlad Ureche2014-04-181-3/+0
| | | | | | | | Some classes only got inline comments instead of getting the full comment.
* | SI-8144 permalinks in scaladocMarcin Kubala2014-03-147-49/+168
|/
* SI-8407 "symbol not found" in Scaladoc use cases: warning onlyJason Zaugg2014-03-131-1/+1
| | | | | | | | | | | | | | | 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.
* Fix typo in log message.Daniel Darabos2014-03-031-1/+1
|
* SI-8229 Source compatible name for implicit any2stringaddJason Zaugg2014-02-181-1/+1
| | | | | | | | | | 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.
* SI-4014 Scaladoc omits @authorKonstantin Fedorov2014-02-022-2/+15
|
* SI-7124 make macro definitions prettier in scaladocAntoine Gourlay2014-01-311-1/+3
| | | | | | Macros are now prettier in scaladoc, by - hiding the `macroImpl` annotation - showing the `macro` modifier in front
* deprecate Pair and TripleDen Shabalin2013-11-201-3/+3
|
* Prevent useless filter operation in docsJentsch2013-10-231-33/+38
|
* Removing unused code.Paul Phillips2013-10-022-7/+4
| | | | | | | 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.
* Updating Position call sites.Paul Phillips2013-09-272-8/+8
| | | | | | Calling position factories rather than instantiating these particular classes. Not calling deprecated methods. Added a few position combinator methods.
* SI-7876 Less dealiasing in Scaladoc's type printing.Jason Zaugg2013-09-261-4/+4
| | | | | | | | | | | | | | | | | | | | | 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.
* Cull extraneous whitespace.Paul Phillips2013-09-183-9/+0
| | | | | | | | | | | | | | | | | | | | | 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.
* SI-7624 Fix a few remaining -Xlint warnings ...Simon Ochsenreither2013-08-152-5/+2
| | | | | in various places. This includes actors, compiler (mostly some new macro parts) continuations, partest, scaladoc, scalap.
* SI-7624 Fix -feature warnings and build with -featureSimon Ochsenreither2013-08-151-5/+4
| | | | | | | | | | | | | | | 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.
* Address TODOs around SymbolLoaders and SymbolTable.Grzegorz Kossakowski2013-07-301-20/+2
| | | | | | | | | | | | | | | | | | | | | | 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
* Refactor the cake so SymbolTable does not depend on GlobalGrzegorz Kossakowski2013-07-271-3/+13
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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.
* Remove dependency on typer phase in ClassfileParser.Grzegorz Kossakowski2013-07-271-0/+10
| | | | | | | | | | | | | | | | | 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.
* Merge pull request #2693 from lexspoon/semmle-lintAdriaan Moors2013-07-011-2/+2
|\ | | | | Lint-like fixes found by Semmle
| * Seals some case class hierarchies.Lex Spoon2013-06-261-2/+2
| |
* | Remove dependency on combinators from CommandLinerParser.Adriaan Moors2013-06-251-1/+1
|/ | | | | | | 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
* SI-6503 Fix scaladoc output to generate valid HTML5Simon Ochsenreither2013-06-092-9/+5
| | | | | | | | | | | | | | | 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.
* Make all numeric coercions explicit.Paul Phillips2013-05-272-3/+3
| | | | | | | | | | | | | 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.
* Concision contribution.Paul Phillips2013-05-231-2/+2
| | | | | | | | | | | | | | | | | | | | | 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.)
* Merge commit 'd93826f278' into pr/enter-elimination-modePaul Phillips2013-05-181-1/+1
|\ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * 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
| * Corralling Modes into a smaller pen.Paul Phillips2013-05-111-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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.
* | Merge 2.10.x into masterAdriaan Moors2013-05-172-13/+26
| | | | | | | | | | | | Conflicts: src/compiler/scala/tools/nsc/typechecker/Implicits.scala src/reflect/scala/reflect/runtime/JavaMirrors.scala
* | Merge v2.10.1-326-g4f8c306' into merge/v2.10.1-326-g4f8c306-to-masterJason Zaugg2013-05-171-7/+10
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | ================================================================ 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
* | Merge pull request #2454 from vigdorchik/scaladoc_fixesJason Zaugg2013-05-178-130/+96
|\ \ | |/ |/| This is a cleanup of scaladoc code.