Skip to content

Commit 4bfa99e

Browse files
committed
include compiler-interface into scala -classpath when -with-compiler flag is specified
1 parent 84d2f7d commit 4bfa99e

File tree

3 files changed

+4
-3
lines changed

3 files changed

+4
-3
lines changed

dist/bin/scala

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -217,7 +217,7 @@ run)
217217
echo "warning: multiple classpaths are found, scala only use the last one."
218218
fi
219219
if [ $with_compiler == true ]; then
220-
run_cparg+="$PSEP$DOTTY_COMP$PSEP$TASTY_CORE$PSEP$DOTTY_INTF$PSEP$SCALA_ASM$PSEP$DOTTY_STAGING$PSEP$DOTTY_TASTY_INSPECTOR"
220+
run_cparg+="$PSEP$DOTTY_COMP$PSEP$TASTY_CORE$PSEP$DOTTY_INTF$PSEP$SCALA_ASM$PSEP$DOTTY_STAGING$PSEP$DOTTY_TASTY_INSPECTOR$PSEP$SBT_INTF"
221221
fi
222222
# exec here would prevent onExit from being called, leaving terminal in unusable state
223223
eval "\"$JAVACMD\"" "-classpath \"$run_cparg\"" "${java_args[@]}" "${residual_args[@]}"

dist/bin/scala.bat

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -48,7 +48,7 @@ if %_EXECUTE_SCRIPT%==1 (
4848
echo Warning: Multiple classpaths are found, scala only use the last one. 1>&2
4949
)
5050
if %_WITH_COMPILER%==1 (
51-
set "_CP_ARG=!_CP_ARG!%_PSEP%%_SCALA3_COMP%%_PSEP%%_TASTY_CORE%%_PSEP%%_SCALA3_INTF%%_PSEP%%_SCALA_ASM%%_PSEP%%_SCALA3_STAGING%%_PSEP%%_SCALA3_TASTY_INSPECTOR%"
51+
set "_CP_ARG=!_CP_ARG!%_PSEP%%_SCALA3_COMP%%_PSEP%%_TASTY_CORE%%_PSEP%%_SCALA3_INTF%%_PSEP%%_SCALA_ASM%%_PSEP%%_SCALA3_STAGING%%_PSEP%%_SCALA3_TASTY_INSPECTOR%%_PSEP%%_SBT_INTF%"
5252
)
5353
set _JAVA_ARGS=-classpath "!_CP_ARG!" %_JVM_OPTS% %_RESIDUAL_ARGS%
5454
call "%_JAVACMD%" !_JAVA_ARGS!

project/Build.scala

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -623,7 +623,8 @@ object Build {
623623
val dottyTastyInspector = jars("scala3-tasty-inspector")
624624
val dottyInterfaces = jars("scala3-interfaces")
625625
val tastyCore = jars("tasty-core")
626-
run(insertClasspathInArgs(args1, List(dottyCompiler, dottyInterfaces, asm, dottyStaging, dottyTastyInspector, tastyCore).mkString(File.pathSeparator)))
626+
val compilerInterface = findArtifactPath(externalDeps, "compiler-interface")
627+
run(insertClasspathInArgs(args1, List(dottyCompiler, dottyInterfaces, asm, dottyStaging, dottyTastyInspector, tastyCore, compilerInterface).mkString(File.pathSeparator)))
627628
} else run(args)
628629
},
629630

0 commit comments

Comments
 (0)