diff --git a/dist/bin/dotc b/dist/bin/dotc index b94fbe4ad95d..b442f27a36c5 100755 --- a/dist/bin/dotc +++ b/dist/bin/dotc @@ -61,6 +61,7 @@ classpathArgs () { toolchain+="$SBT_INTF$PSEP" toolchain+="$DOTTY_INTF$PSEP" toolchain+="$DOTTY_COMP$PSEP" + toolchain+="$DOTTY_STAGING$PSEP" # jine toolchain+="$JLINE_READER$PSEP" diff --git a/dist/bin/dotd b/dist/bin/dotd index 2cc6037dc46a..0475e81ad68a 100755 --- a/dist/bin/dotd +++ b/dist/bin/dotd @@ -76,7 +76,7 @@ ST4_LIB=$(find_lib "*ST4*") # Set jsoup dep: JSOUP_LIB=$(find_lib "*jsoup*") -CLASS_PATH="$DOTTY_LIB$PSEP$DOTTY_COMP$PSEP$DOTTY_DOC_LIB$PSEP$DOTTY_INTF$PSEP$SBT_INTF" +CLASS_PATH="$DOTTY_LIB$PSEP$DOTTY_COMP$PSEP$DOTTY_DOC_LIB$PSEP$DOTTY_INTF$PSEP$SBT_INTF$PSEP$DOTTY_STAGING" CLASS_PATH="$CLASS_PATH$PSEP$SCALA_LIB" CLASS_PATH="$CLASS_PATH$PSEP$FLEXMARK_LIBS" CLASS_PATH="$CLASS_PATH$PSEP$JACKSON_LIBS" diff --git a/dist/bin/dotr b/dist/bin/dotr index 0dd677bb48ee..5d8808a3ed4d 100755 --- a/dist/bin/dotr +++ b/dist/bin/dotr @@ -102,7 +102,7 @@ elif [ $execute_repl == true ] || [ ${#residual_args[@]} -ne 0 ]; then echo "warning: multiple classpaths are found, dotr only use the last one." fi if [ $with_compiler == true ]; then - cp_arg+="$PSEP$DOTTY_COMP$PSEP$DOTTY_INTF$PSEP$SCALA_ASM$DOTTY_STAGING" + cp_arg+="$PSEP$DOTTY_COMP$PSEP$DOTTY_INTF$PSEP$SCALA_ASM$PSEP$DOTTY_STAGING" fi eval exec "\"$JAVACMD\"" "$DEBUG" "-classpath \"$cp_arg\"" "${jvm_options[@]}" "${residual_args[@]}" else diff --git a/project/Build.scala b/project/Build.scala index fb33f286fa02..f9f74e7b4462 100644 --- a/project/Build.scala +++ b/project/Build.scala @@ -1288,7 +1288,7 @@ object Build { def asDist(implicit mode: Mode): Project = project. enablePlugins(PackPlugin). withCommonSettings. - dependsOn(`dotty-interfaces`, dottyCompiler, dottyLibrary, dottyDoc). + dependsOn(`dotty-interfaces`, dottyCompiler, dottyLibrary, `dotty-staging`, dottyDoc). settings(commonDistSettings). bootstrappedSettings( target := baseDirectory.value / "target" // override setting in commonBootstrappedSettings diff --git a/project/scripts/bootstrapCmdTests b/project/scripts/bootstrapCmdTests index 4f683aedb5c3..598cedf068e6 100755 --- a/project/scripts/bootstrapCmdTests +++ b/project/scripts/bootstrapCmdTests @@ -23,6 +23,12 @@ clear_out "$OUT" ./bin/dotr -classpath "$OUT" "$MAIN" > "$tmp" test "$EXPECTED_OUTPUT" = "$(cat "$tmp")" +# check that `dotc` and `dotr` works for staging +clear_out "$OUT" +./bin/dotc tests/run-staging/i4044f.scala -d "$OUT" +./bin/dotr -with-compiler -classpath "$OUT" Test > "$tmp" +./bin/dotd -project Staging -siteroot "$OUT" "tests/run-staging/i4044f.scala" + # check that `dotc -from-tasty` compiles and `dotr` runs it echo "testing ./bin/dotc -from-tasty and dotr -classpath" clear_out "$OUT1"