From e8746dc0c7f3739a21202987f4b36fe88bd58092 Mon Sep 17 00:00:00 2001 From: Grzegorz Kossakowski Date: Thu, 24 Oct 2013 12:45:00 +0200 Subject: [PATCH] Add a bit documentation to Dependency phase. It gives some high-level overview of what this phase does. --- .../src/main/scala/xsbt/Dependency.scala | 15 +++++++++++++++ 1 file changed, 15 insertions(+) diff --git a/compile/interface/src/main/scala/xsbt/Dependency.scala b/compile/interface/src/main/scala/xsbt/Dependency.scala index 602eab49a..8035574e6 100644 --- a/compile/interface/src/main/scala/xsbt/Dependency.scala +++ b/compile/interface/src/main/scala/xsbt/Dependency.scala @@ -13,6 +13,21 @@ object Dependency { def name = "xsbt-dependency" } +/** + * Extracts dependency information from each compilation unit. + * + * This phase uses CompilationUnit.depends and CallbackGlobal.inheritedDependencies + * to collect all symbols that given compilation unit depends on. Those symbols are + * guaranteed to represent Class-like structures. + * + * The CallbackGlobal.inheritedDependencies is populated by the API phase. See, + * ExtractAPI class. + * + * When dependency symbol is processed, it is mapped back to either source file where + * it's defined in (if it's available in current compilation run) or classpath entry + * where it originates from. The Symbol->Classfile mapping is implemented by + * LocateClassFile that we inherit from. + */ final class Dependency(val global: CallbackGlobal) extends LocateClassFile { import global._