Skip to content
Merged
Show file tree
Hide file tree
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
2 changes: 1 addition & 1 deletion dist/bin/dotc
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ bootcp=true

CompilerMain=dotty.tools.dotc.Main
FromTasty=dotty.tools.dotc.FromTasty
ReplMain=dotty.tools.dotc.repl.Main
ReplMain=dotty.tools.repl.Main

PROG_NAME=$CompilerMain

Expand Down
16 changes: 14 additions & 2 deletions project/Build.scala
Original file line number Diff line number Diff line change
Expand Up @@ -391,8 +391,6 @@ object Build {
)
}.evaluated,

repl := run.evaluated,

javaOptions ++= (javaOptions in `dotty-compiler`).value,
fork in run := true,
fork in Test := true,
Expand Down Expand Up @@ -581,6 +579,20 @@ object Build {
}.evaluated,
dotc := run.evaluated,

repl := Def.inputTaskDyn {
val dottyLib = packageAll.value("dotty-library")
val args: Seq[String] = spaceDelimited("<arg>").parsed

val fullArgs = args.span(_ != "-classpath") match {
case (beforeCp, Nil) => beforeCp ++ ("-classpath" :: dottyLib :: Nil)
case (beforeCp, rest) => beforeCp ++ rest
}

(runMain in Compile).toTask(
s" dotty.tools.repl.Main " + fullArgs.mkString(" ")
)
}.evaluated,

// enable verbose exception messages for JUnit
testOptions in Test += Tests.Argument(
TestFrameworks.JUnit, "-a", "-v",
Expand Down