summaryrefslogtreecommitdiff
path: root/src/scaladoc
Commit message (Collapse)AuthorAgeFilesLines
* 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.
| * No longer cache all subclass templates.Eugene Vigdorchik2013-05-173-40/+32
| | | | | | | | | | Instead only cache direct subclasses and compute all known subclasses as a transitive closure.
| * Remove self types check suppression usage from scaladoc.Eugene Vigdorchik2013-05-171-5/+0
| | | | | | | | Also remove private setting not used anymore.
| * Improve code style in the Scaladoc implementation.Eugene Vigdorchik2013-05-165-85/+64
| | | | | | | | | | | | | | | | It fixes the following inefficiences or code style violations: - Explicit asInstanceOf calls. - Boxing symbols instead of using plain NoSymbol. - Matching `this` instead of late-binding.
* | Absolutized paths involving the scala package.Paul Phillips2013-05-038-10/+21
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Confusing, now-it-happens now-it-doesn't mysteries lurk in the darkness. When scala packages are declared like this: package scala.collection.mutable Then paths relative to scala can easily be broken via the unlucky presence of an empty (or nonempty) directory. Example: // a.scala package scala.foo class Bar { new util.Random } % scalac ./a.scala % mkdir util % scalac ./a.scala ./a.scala:4: error: type Random is not a member of package util new util.Random ^ one error found There are two ways to play defense against this: - don't use relative paths; okay sometimes, less so others - don't "opt out" of the scala package This commit mostly pursues the latter, with occasional doses of the former. I created a scratch directory containing these empty directories: actors annotation ant api asm beans cmd collection compat concurrent control convert docutil dtd duration event factory forkjoin generic hashing immutable impl include internal io logging macros man1 matching math meta model mutable nsc parallel parsing partest persistent process pull ref reflect reify remote runtime scalap scheduler script swing sys text threadpool tools transform unchecked util xml I stopped when I could compile the main src directories even with all those empties on my classpath.
* | Merge 2.10.x into masterAdriaan Moors2013-05-022-31/+29
|/ | | | | | | | | | Conflicts: bincompat-forward.whitelist.conf src/compiler/scala/tools/nsc/matching/Patterns.scala src/compiler/scala/tools/nsc/transform/patmat/Logic.scala src/compiler/scala/tools/nsc/typechecker/Infer.scala src/scaladoc/scala/tools/nsc/doc/model/ModelFactory.scala test/files/neg/t5663-badwarneq.check
* Merge branch 'master' into pr/warning-cleanupPaul Phillips2013-04-241-6/+3
|\ | | | | | | | | Conflicts: src/compiler/scala/tools/nsc/typechecker/Contexts.scala
| * Merge pull request #2393 from retronym/ticket/7345-2Paul Phillips2013-04-241-6/+3
| |\ | | | | | | SI-7345 Refactoring Contexts
| | * Merge remote-tracking branch 'origin/master' into ticket/7345-2Jason Zaugg2013-04-212-22/+0
| | |\ | | | | | | | | | | | | | | | | | | | | Conflicts: src/compiler/scala/tools/nsc/typechecker/Contexts.scala src/compiler/scala/tools/nsc/typechecker/Typers.scala
| | * | SI-7345 Prefer using a throwaway silent context over buffer flushing.Jason Zaugg2013-04-211-6/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | When we are using a throwaway silent context, we can just let it drift out of scope and over the horizon, rather than ceremoniously flushing its buffers on completion. - Applied to Scaladoc. - Applied to Infer#isApplicableSafe. Less manual error buffer management affords greater opportunity to cleanly express the logic. - Applied to `typerReportAnyContextErrors`. The reasoning for the last case is as follows: - There were only two callers to `typerReportAnyContextErrors`, and they both passed in as `c` a child context of `context`. - That child context must share the error reporting mode and buffer with `context`. - Therefore, extracting an error from `c` and issuing it into `context` is a no-op. Because the error buffer is Set, it was harmless. This part will probably textually conflict with the same change made in SI-7319, but the end results are identical.
| | * | SI-7345 Rationalize overloads of Context#makeJason Zaugg2013-04-211-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Used default arguments and removed of variations only used in one place. I couldn't eliminate them all: one remaining overload avoids allocating a new context when the scope/owner/tree don't change, but moving this optimizatin to the primary overload of make breaks things. This is noted in a TODO comment.
* | | | Eliminated the accumulated feature warnings.Paul Phillips2013-04-231-19/+19
|/ / / | | | | | | | | | | | | | | | | | | | | | | | | No, this isn't busywork, how dare you suggest such a thing. I intend my tombstone to say HERE LIES EXTEMPORE, WHO ELIMINATED A LOT OF SIP-18 WARNINGS REST IN PEACE
* | | Merge pull request #2396 from som-snytt/issue/unmoored-docAdriaan Moors2013-04-221-25/+54
|\ \ \ | |_|/ |/| | SI-7376 Scaladoc warns when discarding local doc comments with API tags
| * | SI-7376 Unmoored doc has correct positionSom Snytt2013-04-171-24/+17
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The unmoored DocComment is created more eagerly so that its position is correct despite subsequent line comments. (Previously, skipComment would advance docPos.) It looks like the error caret is still off by one when a doc comment shows up in the middle of an operator, and who doesn't scaladoc the interior of expressions? Another bug fixed by Paul's refactor is that additional comments between the doc and the entity no longer breaks the scaladoc. Test added.
| * | SI-7376 Scaladoc warns when discarding local doc comments with API tagsSom Snytt2013-04-151-2/+38
| |/ | | | | | | | | | | | | | | | | | | | | | | | | Double-star doc comments in non-dockable positions at the end of a block will emit a warning only if API tags like @author are present, or under -Xlint. A real comment parser is applied early to probe for tags, to minimize ad hoc testing or duplication, but warnings are suppressed. Residual ad hockiness lies in precisely which tags to warn on. Ad hoc or ad doc. This fix is a stop gap; a richer solution would also report about other doc locations that won't be processed.
* / Remove scaladoc deprecated option.Eugene Vigdorchik2013-04-102-22/+0
|/ | | | Remove -external-urls that had been previously deprecated in 2.10.
* Merge pull request #2327 from paulp/pr/2315-rebasedPaul Phillips2013-04-0210-16/+16
|\ | | | | SI-7261 Implicit conversion of BooleanSetting to Boolean and BooleanFlag
| * SI-7261 Implicit conversion of BooleanSetting to Boolean and BooleanFlagSom Snytt2013-03-2710-16/+16
| | | | | | | | | | | | | | 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.
* | Merge remote tracking branch 'origin/2.10.x' into ↵Jason Zaugg2013-04-022-10/+14
|/ | | | | | | | | | | | | | | | | | | | | topic/merge-2.10.x-to-v2.11.0-M2-74-g00e6c8b Conflicts: bincompat-backward.whitelist.conf bincompat-forward.whitelist.conf build.xml src/compiler/scala/reflect/reify/utils/Extractors.scala src/compiler/scala/tools/nsc/backend/jvm/GenJVM.scala src/compiler/scala/tools/nsc/symtab/classfile/ICodeReader.scala src/compiler/scala/tools/nsc/transform/patmat/MatchOptimization.scala src/compiler/scala/tools/nsc/typechecker/Typers.scala src/partest/scala/tools/partest/nest/ReflectiveRunner.scala src/reflect/scala/reflect/internal/Types.scala src/reflect/scala/reflect/runtime/JavaUniverse.scala test/files/run/inline-ex-handlers.check test/files/run/t6223.check test/files/run/t6223.scala test/scaladoc/scalacheck/IndexTest.scala
* Eliminate a bunch of -Xlint warnings.Paul Phillips2013-03-125-6/+2
| | | | | | Mostly unused private code, unused imports, and points where an extra pair of parentheses is necessary for scalac to have confidence in our intentions.