Skip to content

Commit 38c1da6

Browse files
Merge pull request #7148 from dotty-staging/fix-7146
Fix #7146: make dotty-staging available in REPL
2 parents 6d500c5 + 5c509df commit 38c1da6

File tree

5 files changed

+10
-3
lines changed

5 files changed

+10
-3
lines changed

dist/bin/dotc

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -61,6 +61,7 @@ classpathArgs () {
6161
toolchain+="$SBT_INTF$PSEP"
6262
toolchain+="$DOTTY_INTF$PSEP"
6363
toolchain+="$DOTTY_COMP$PSEP"
64+
toolchain+="$DOTTY_STAGING$PSEP"
6465

6566
# jine
6667
toolchain+="$JLINE_READER$PSEP"

dist/bin/dotd

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -76,7 +76,7 @@ ST4_LIB=$(find_lib "*ST4*")
7676
# Set jsoup dep:
7777
JSOUP_LIB=$(find_lib "*jsoup*")
7878

79-
CLASS_PATH="$DOTTY_LIB$PSEP$DOTTY_COMP$PSEP$DOTTY_DOC_LIB$PSEP$DOTTY_INTF$PSEP$SBT_INTF"
79+
CLASS_PATH="$DOTTY_LIB$PSEP$DOTTY_COMP$PSEP$DOTTY_DOC_LIB$PSEP$DOTTY_INTF$PSEP$SBT_INTF$PSEP$DOTTY_STAGING"
8080
CLASS_PATH="$CLASS_PATH$PSEP$SCALA_LIB"
8181
CLASS_PATH="$CLASS_PATH$PSEP$FLEXMARK_LIBS"
8282
CLASS_PATH="$CLASS_PATH$PSEP$JACKSON_LIBS"

dist/bin/dotr

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -102,7 +102,7 @@ elif [ $execute_repl == true ] || [ ${#residual_args[@]} -ne 0 ]; then
102102
echo "warning: multiple classpaths are found, dotr only use the last one."
103103
fi
104104
if [ $with_compiler == true ]; then
105-
cp_arg+="$PSEP$DOTTY_COMP$PSEP$DOTTY_INTF$PSEP$SCALA_ASM$DOTTY_STAGING"
105+
cp_arg+="$PSEP$DOTTY_COMP$PSEP$DOTTY_INTF$PSEP$SCALA_ASM$PSEP$DOTTY_STAGING"
106106
fi
107107
eval exec "\"$JAVACMD\"" "$DEBUG" "-classpath \"$cp_arg\"" "${jvm_options[@]}" "${residual_args[@]}"
108108
else

project/Build.scala

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1288,7 +1288,7 @@ object Build {
12881288
def asDist(implicit mode: Mode): Project = project.
12891289
enablePlugins(PackPlugin).
12901290
withCommonSettings.
1291-
dependsOn(`dotty-interfaces`, dottyCompiler, dottyLibrary, dottyDoc).
1291+
dependsOn(`dotty-interfaces`, dottyCompiler, dottyLibrary, `dotty-staging`, dottyDoc).
12921292
settings(commonDistSettings).
12931293
bootstrappedSettings(
12941294
target := baseDirectory.value / "target" // override setting in commonBootstrappedSettings

project/scripts/bootstrapCmdTests

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,12 @@ clear_out "$OUT"
2323
./bin/dotr -classpath "$OUT" "$MAIN" > "$tmp"
2424
test "$EXPECTED_OUTPUT" = "$(cat "$tmp")"
2525

26+
# check that `dotc` and `dotr` works for staging
27+
clear_out "$OUT"
28+
./bin/dotc tests/run-staging/i4044f.scala -d "$OUT"
29+
./bin/dotr -with-compiler -classpath "$OUT" Test > "$tmp"
30+
./bin/dotd -project Staging -siteroot "$OUT" "tests/run-staging/i4044f.scala"
31+
2632
# check that `dotc -from-tasty` compiles and `dotr` runs it
2733
echo "testing ./bin/dotc -from-tasty and dotr -classpath"
2834
clear_out "$OUT1"

0 commit comments

Comments
 (0)