diff options
author | Lukas Rytz <lukas.rytz@gmail.com> | 2016-03-22 21:26:35 +0100 |
---|---|---|
committer | Lukas Rytz <lukas.rytz@gmail.com> | 2016-03-22 21:46:51 +0100 |
commit | f8950c1457955835f4411beb8dcb3672f7cd39bd (patch) | |
tree | ee7b309b133ca04b2acf0d53533641e939cee75b /src/compiler/scala/tools/nsc/util/ClassPath.scala | |
parent | 6cb50acfb5ee4df342e83d8505116d4607f45d1c (diff) | |
download | scala-f8950c1457955835f4411beb8dcb3672f7cd39bd.tar.gz scala-f8950c1457955835f4411beb8dcb3672f7cd39bd.tar.bz2 scala-f8950c1457955835f4411beb8dcb3672f7cd39bd.zip |
Support :require when using the flat classpath representation.
:require was re-incarnated in https://github.com/scala/scala/pull/4051,
it seems to be used by the spark repl. This commit makes it work when
using the flat classpath representation.
Diffstat (limited to 'src/compiler/scala/tools/nsc/util/ClassPath.scala')
-rw-r--r-- | src/compiler/scala/tools/nsc/util/ClassPath.scala | 9 |
1 files changed, 1 insertions, 8 deletions
diff --git a/src/compiler/scala/tools/nsc/util/ClassPath.scala b/src/compiler/scala/tools/nsc/util/ClassPath.scala index 2811520b67..6cdc3856cd 100644 --- a/src/compiler/scala/tools/nsc/util/ClassPath.scala +++ b/src/compiler/scala/tools/nsc/util/ClassPath.scala @@ -278,7 +278,7 @@ class DirectoryClassPath(val dir: AbstractFile, val context: ClassPathContext[Ab f => // Optimization: We assume the file was not changed since `dir` called // `Path.apply` and categorized existent files as `Directory` - // or `File`. + // or `File` (avoids IO operation JFile.isDirectory()). val isDirectory = f match { case pf: io.PlainFile => pf.givenPath match { case _: io.Directory => true @@ -300,13 +300,6 @@ class DirectoryClassPath(val dir: AbstractFile, val context: ClassPathContext[Ab override def toString() = "directory classpath: "+ origin.getOrElse("?") } -class DeltaClassPath[T](original: MergedClassPath[T], subst: Map[ClassPath[T], ClassPath[T]]) -extends MergedClassPath[T](original.entries map (e => subst getOrElse (e, e)), original.context) { - // not sure we should require that here. Commented out for now. - // require(subst.keySet subsetOf original.entries.toSet) - // We might add specialized operations for computing classes packages here. Not sure it's worth it. -} - /** * A classpath unifying multiple class- and sourcepath entries. */ |