Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
14 changes: 8 additions & 6 deletions stage2/plugins/Dotty.scala
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,6 @@ trait CustomDotty extends BaseBuild{
override def scalaTarget: File = target ++ s"/dotty"

def dottyCompiler: DependencyImplementation
def dottyLibrary: DependencyImplementation

private lazy val dottyLib = new DottyLib(
context.cbtLastModified, context.paths.mavenCache, dottyCompiler
Expand All @@ -29,8 +28,8 @@ trait CustomDotty extends BaseBuild{
override def dependencies: Seq[Dependency] = Seq()

// this makes sure the scala or java classes compiled first are available on subsequent compile
override def compileDependencies: Seq[Dependency]
= super.compileDependencies ++ Seq( compileTarget ).filter(_.exists).map( t => BinaryDependency( Seq(t), Nil ) )
//override def compileDependencies: Seq[Dependency]
// = super.compileDependencies //++ Seq( compileTarget ).filter(_.exists).map( t => BinaryDependency( Seq(t), Nil ) )

override def compile: Option[Long] = taskCache[Dotty]("compile").memoize{
def compileDotty =
Expand Down Expand Up @@ -158,7 +157,6 @@ class DottyLib(
System.err.println("Compiling with Dotty to " ++ compileTarget.toString)
compileTarget.mkdirs
redirectOutToErr{
/*
println(
s"""
------------------------------
Expand All @@ -171,18 +169,22 @@ ${dualArgs.grouped(2).map(_.mkString(" ")).mkString(" \\\n")} \\
\\
${singleArgs.mkString(" \\\n")} \\
\\
${if(cp.isEmpty) "" else Seq("-classpath", cp).mkString("\n\n")}
\\
${sourceFiles.sorted.mkString(" \\\n")}
------------------------------
"""
)
*/

dottyCompiler.runMain(
_class,
dualArgs ++ singleArgs ++ /* Seq(
"-bootclasspath", dottyCompiler.exportedClasspath.string
) ++*/ (
if(cp.isEmpty) Nil else Seq("-classpath", cp) // let's put cp last. It so long
if(cp.isEmpty) Nil else Seq("-classpath", cp)
//":/Users/fixel/Projects/dotty/library/target/hack") // let's put cp last. It so long
) ++ Seq(
"-sourcepath", "/Users/fixel/Projects/dotty/library/src"
) ++ sourceFiles.map(_.toString)
)
}
Expand Down