@@ -518,11 +518,16 @@ object Build {
518
518
}
519
519
},
520
520
run := Def .inputTaskDyn {
521
+ val attList = (dependencyClasspath in Runtime ).value
522
+ val scalaLib = attList
523
+ .map(_.data.getAbsolutePath)
524
+ .find(_.contains(" scala-library" ))
525
+ .toList.mkString(" :" )
521
526
val dottyLib = packageAll.value(" dotty-library" )
522
527
val args : Seq [String ] = spaceDelimited(" <arg>" ).parsed
523
528
524
529
val fullArgs = args.span(_ != " -classpath" ) match {
525
- case (beforeCp, Nil ) => beforeCp ++ (" -classpath" :: dottyLib :: Nil )
530
+ case (beforeCp, Nil ) => beforeCp ++ (" -classpath" :: s " $ dottyLib: $scalaLib " :: Nil )
526
531
case (beforeCp, rest) => beforeCp ++ rest
527
532
}
528
533
@@ -533,11 +538,16 @@ object Build {
533
538
dotc := run.evaluated,
534
539
535
540
repl := Def .inputTaskDyn {
541
+ val attList = (dependencyClasspath in Runtime ).value
542
+ val scalaLib = attList
543
+ .map(_.data.getAbsolutePath)
544
+ .find(_.contains(" scala-library" ))
545
+ .toList.mkString(" :" )
536
546
val dottyLib = packageAll.value(" dotty-library" )
537
547
val args : Seq [String ] = spaceDelimited(" <arg>" ).parsed
538
548
539
549
val fullArgs = args.span(_ != " -classpath" ) match {
540
- case (beforeCp, Nil ) => beforeCp ++ (" -classpath" :: dottyLib :: Nil )
550
+ case (beforeCp, Nil ) => beforeCp ++ (" -classpath" :: s " $ dottyLib: $scalaLib " :: Nil )
541
551
case (beforeCp, rest) => beforeCp ++ rest
542
552
}
543
553
@@ -596,25 +606,8 @@ object Build {
596
606
// http://grokbase.com/t/gg/simple-build-tool/135ke5y90p/sbt-setting-jvm-boot-paramaters-for-scala
597
607
// packageAll should always be run before tests
598
608
javaOptions ++= {
599
- val attList = (dependencyClasspath in Runtime ).value
600
609
val pA = packageAll.value
601
610
602
- // put needed dependencies on classpath:
603
- val path = for {
604
- file <- attList.map(_.data)
605
- path = file.getAbsolutePath
606
- // FIXME: when we snip the cord, this should go bye-bye
607
- if path.contains(" scala-library" ) ||
608
- // FIXME: currently needed for tests referencing scalac internals
609
- path.contains(" scala-reflect" ) ||
610
- // FIXME: should go away when xml literal parsing is removed
611
- path.contains(" scala-xml" ) ||
612
- // used for tests that compile dotty
613
- path.contains(" scala-asm" ) ||
614
- // needed for the xsbti interface
615
- path.contains(" sbt-interface" )
616
- } yield " -Xbootclasspath/p:" + path
617
-
618
611
val ci_build = // propagate if this is a ci build
619
612
if (sys.props.isDefinedAt(JENKINS_BUILD ))
620
613
List (s " -D $JENKINS_BUILD= ${sys.props(JENKINS_BUILD )}" ) ::: jenkinsMemLimit
@@ -634,7 +627,7 @@ object Build {
634
627
" -Ddotty.tests.classes.compiler=" + pA(" dotty-compiler" )
635
628
)
636
629
637
- jars ::: tuning ::: agentOptions ::: ci_build ::: path.toList
630
+ jars ::: tuning ::: agentOptions ::: ci_build
638
631
}
639
632
)
640
633
0 commit comments