aboutsummaryrefslogtreecommitdiff
path: root/stage1
diff options
context:
space:
mode:
authorChristopher Vogt <oss.nsp@cvogt.org>2017-02-01 23:53:08 -0500
committerChristopher Vogt <oss.nsp@cvogt.org>2017-02-01 23:53:08 -0500
commit0d98155071d75dd135adca9d5977b365088f8190 (patch)
tree7f1c88fb4f1f59fd394c15fa29a9e0fe271c607f /stage1
parente56f8afa03035140280bc8d3d878ad225def381e (diff)
downloadcbt-0d98155071d75dd135adca9d5977b365088f8190.tar.gz
cbt-0d98155071d75dd135adca9d5977b365088f8190.tar.bz2
cbt-0d98155071d75dd135adca9d5977b365088f8190.zip
make full dependencies available to compile instead of only classpath
this will make it possible to access lastModified times and cache them in the following commits
Diffstat (limited to 'stage1')
-rw-r--r--stage1/Stage1.scala2
-rw-r--r--stage1/Stage1Lib.scala3
-rw-r--r--stage1/resolver.scala4
3 files changed, 5 insertions, 4 deletions
diff --git a/stage1/Stage1.scala b/stage1/Stage1.scala
index 2f8f960..f0540b4 100644
--- a/stage1/Stage1.scala
+++ b/stage1/Stage1.scala
@@ -98,7 +98,7 @@ object Stage1{
cbtHasChanged,
cbtHasChanged,
stage2sourceFiles, stage2Target, stage2StatusFile,
- cbtDependency.dependencyClasspath,
+ cbtDependency.dependencies,
mavenCache,
Seq("-deprecation","-feature","-unchecked"), classLoaderCache,
zincVersion = constants.zincVersion, scalaVersion = constants.scalaVersion
diff --git a/stage1/Stage1Lib.scala b/stage1/Stage1Lib.scala
index 9b48409..296581c 100644
--- a/stage1/Stage1Lib.scala
+++ b/stage1/Stage1Lib.scala
@@ -194,7 +194,7 @@ class Stage1Lib( val logger: Logger ) extends BaseLib{
files: Seq[File],
compileTarget: File,
statusFile: File,
- classpath: ClassPath,
+ dependencies: Seq[Dependency],
mavenCache: File,
scalacOptions: Seq[String] = Seq(),
classLoaderCache: ClassLoaderCache,
@@ -202,6 +202,7 @@ class Stage1Lib( val logger: Logger ) extends BaseLib{
scalaVersion: String
): Option[File] = {
+ val classpath = Dependencies(dependencies).classpath
val cp = classpath.string
if(classpath.files.isEmpty)
throw new Exception("Trying to compile with empty classpath. Source files: " ++ files.toString)
diff --git a/stage1/resolver.scala b/stage1/resolver.scala
index 1f94c7f..f4af73e 100644
--- a/stage1/resolver.scala
+++ b/stage1/resolver.scala
@@ -128,8 +128,8 @@ case class ScalaDependencies(cbtHasChanged: Boolean, mavenCache: File, version:
)
}
-case class BinaryDependency( path: File, dependencies: Seq[Dependency] )(implicit val logger: Logger) extends DependencyImplementation{
- def exportedClasspath = ClassPath(Seq(path))
+case class BinaryDependency( paths: Seq[File], dependencies: Seq[Dependency] )(implicit val logger: Logger) extends DependencyImplementation{
+ def exportedClasspath = ClassPath(paths)
override def needsUpdate = false
def targetClasspath = exportedClasspath
}