Skip to content

Fix #7146: make dotty-staging available in REPL #7148

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 3 commits into from
Sep 1, 2019
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
1 change: 1 addition & 0 deletions dist/bin/dotc
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand Down
2 changes: 1 addition & 1 deletion dist/bin/dotd
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand Down
2 changes: 1 addition & 1 deletion dist/bin/dotr
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
2 changes: 1 addition & 1 deletion project/Build.scala
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
6 changes: 6 additions & 0 deletions project/scripts/bootstrapCmdTests
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand Down