summaryrefslogtreecommitdiff
path: root/src/scaladoc
diff options
context:
space:
mode:
authorGrzegorz Kossakowski <grzegorz.kossakowski@gmail.com>2013-07-30 22:26:38 -0700
committerGrzegorz Kossakowski <grzegorz.kossakowski@gmail.com>2013-07-30 22:26:38 -0700
commit3cb3c8e35c3df31a7f661903eca48cca557d5a49 (patch)
treedac4cab1e761330d6b61f4347a48c5c6051ca1e1 /src/scaladoc
parent115e8b4492851137ad2b5b61b9bf78bb51601dff (diff)
downloadscala-3cb3c8e35c3df31a7f661903eca48cca557d5a49.tar.gz
scala-3cb3c8e35c3df31a7f661903eca48cca557d5a49.tar.bz2
scala-3cb3c8e35c3df31a7f661903eca48cca557d5a49.zip
Address TODOs around SymbolLoaders and SymbolTable.
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
Diffstat (limited to 'src/scaladoc')
-rw-r--r--src/scaladoc/scala/tools/nsc/doc/ScaladocGlobal.scala22
1 files changed, 2 insertions, 20 deletions
diff --git a/src/scaladoc/scala/tools/nsc/doc/ScaladocGlobal.scala b/src/scaladoc/scala/tools/nsc/doc/ScaladocGlobal.scala
index 94d3809fc3..723f8b1dc8 100644
--- a/src/scaladoc/scala/tools/nsc/doc/ScaladocGlobal.scala
+++ b/src/scaladoc/scala/tools/nsc/doc/ScaladocGlobal.scala
@@ -25,33 +25,15 @@ trait ScaladocGlobalTrait extends Global {
}
override lazy val loaders = new {
- val symbolTable: outer.type = outer
- val platform: outer.platform.type = outer.platform
- // `global` val is needed so we conform to loaders type in Global in Scala 2.11.0-M4
- // TODO: remove once 2.11.0-M5 is used to build Scaladoc
val global: outer.type = outer
- } with SymbolLoaders {
+ val platform: outer.platform.type = outer.platform
+ } with GlobalSymbolLoaders {
// SI-5593 Scaladoc's current strategy is to visit all packages in search of user code that can be documented
// therefore, it will rummage through the classpath triggering errors whenever it encounters package objects
// that are not in their correct place (see bug for details)
override protected def signalError(root: Symbol, ex: Throwable) {
log(s"Suppressing error involving $root: $ex")
}
-
- // TODO: Add `override` modifier once Scala 2.11.0-M5 is used to build Scaladoc
- protected /*override*/ def compileLate(srcfile: io.AbstractFile): Unit =
- currentRun.compileLate(srcfile)
-
- // TODO: Add `override` modifier once Scala 2.11.0-M5 is used to build Scaladoc
- protected def /*override*/ lookupMemberAtTyperPhaseIfPossible(sym: Symbol, name: Name): Symbol = {
- def lookup = sym.info.member(name)
- // if loading during initialization of `definitions` typerPhase is not yet set.
- // in that case we simply load the member at the current phase
- if (currentRun.typerPhase eq null)
- lookup
- else
- enteringTyper { lookup }
- }
}
}