Fix 2.8 external dependency tracking

This commit is contained in:
Mark Harrah 2009-12-14 18:37:17 -05:00
parent 016a4ecea7
commit cbb0f1a0a8
2 changed files with 3 additions and 2 deletions

View File

@ -193,8 +193,9 @@ final class Analyzer(val global: Global, val callback: AnalysisCallback) extends
private val findClass0 = reflect[Option[AnyRef]]("findClass", classOf[String])
findClass0.force(classPath) // force discovery, so that an exception is thrown if method doesn't exist
private val extractClass0 = reflect[Option[AbstractFile]]("binary")
private def translate(name: String): String = name.replace(File.separatorChar, '.') // 2.8 uses '.', 2.7 uses '/'
def findClass(name: String): Option[AbstractFile] =
findClass0(classPath, name).flatMap(a => extractClass0(a))
findClass0(classPath, translate(name)).flatMap {a => extractClass0(a) }
}
private class LegacyFinder extends ClassFinder
{

View File

@ -76,7 +76,7 @@ class CompilerInterface
if(!reporter.hasErrors)
{
val run = new compiler.Run
debug(args.mkString("Calling compiler with arguments (CompilerInterface):\n\t", "\n\t", ""))
debug(args.mkString("Calling Scala compiler with arguments (CompilerInterface):\n\t", "\n\t", ""))
run compile command.files
}
reporter.printSummary()