Skip to content

Fix: scalac should not call itself dotc #10065

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 1 commit into from
Oct 22, 2020
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
4 changes: 2 additions & 2 deletions compiler/src/dotty/tools/dotc/config/CompilerCommand.scala
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ import scala.collection.JavaConverters._
object CompilerCommand {

/** The name of the command */
def cmdName: String = "dotc"
def cmdName: String = "scalac"

private def explainAdvanced = """
|-- Notes on option parsing --
Expand Down Expand Up @@ -137,7 +137,7 @@ object CompilerCommand {

if (summary.errors.nonEmpty) {
summary.errors foreach (report.error(_))
report.echo(" dotc -help gives more information")
report.echo(" scalac -help gives more information")
Nil
}
else if (settings.version.value) {
Expand Down
4 changes: 2 additions & 2 deletions compiler/src/dotty/tools/dotc/config/Properties.scala
Original file line number Diff line number Diff line change
Expand Up @@ -129,6 +129,6 @@ trait PropertiesTrait {
def jdkHome: String = envOrElse("JDK_HOME", envOrElse("JAVA_HOME", javaHome))

def versionMsg: String = "Scala %s %s -- %s".format(propCategory, versionString, copyrightString)
def scalaCmd: String = if (isWin) "dotr.bat" else "dotr"
def scalacCmd: String = if (isWin) "dotc.bat" else "dotc"
def scalaCmd: String = if (isWin) "scala.bat" else "scala"
def scalacCmd: String = if (isWin) "scalac.bat" else "scalac"
}
2 changes: 1 addition & 1 deletion compiler/src/dotty/tools/dotc/core/Phases.scala
Original file line number Diff line number Diff line change
Expand Up @@ -263,7 +263,7 @@ object Phases {
* instance, it is possible to print trees after a given phase using:
*
* ```bash
* $ ./bin/dotc -Xprint:<phaseNameHere> sourceFile.scala
* $ ./bin/scalac -Xprint:<phaseNameHere> sourceFile.scala
* ```
*/
def phaseName: String
Expand Down
4 changes: 2 additions & 2 deletions compiler/test/debug/Gen
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,8 @@ SOURCE=$DIR/Gen.scala
CLASS=./Gen.class

if [ ! -e $CLASS ] || [ $SOURCE -nt $CLASS ]; then
./bin/dotc $DIR/Gen.scala
./bin/scalac $DIR/Gen.scala
fi

./bin/dotr Gen $@
./bin/scala Gen $@

4 changes: 2 additions & 2 deletions compiler/test/debug/test
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,8 @@ DIR="$( cd "$( dirname "$0" )" && pwd )"

echo "start debug test..."
for file in tests/debug/*.scala; do
./bin/dotc $file || exit 1
./bin/dotr -d Test > /dev/null &
./bin/scalac $file || exit 1
./bin/scala -d Test > /dev/null &
$DIR/Gen $file > robot
expect robot 2>&1 > /dev/null

Expand Down
6 changes: 3 additions & 3 deletions compiler/test/dotty/tools/dotc/FromTastyTests.scala
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ class FromTastyTests {
@Test def posTestFromTasty: Unit = {
// Can be reproduced with
// > sbt
// > dotc -Ythrough-tasty -Ycheck:all <source>
// > scalac -Ythrough-tasty -Ycheck:all <source>

implicit val testGroup: TestGroup = TestGroup("posTestFromTasty")
compileTastyInDir(s"tests${JFile.separator}pos", defaultOptions,
Expand All @@ -27,8 +27,8 @@ class FromTastyTests {
@Test def runTestFromTasty: Unit = {
// Can be reproduced with
// > sbt
// > dotc -Ythrough-tasty -Ycheck:all <source>
// > dotr Test
// > scalac -Ythrough-tasty -Ycheck:all <source>
// > scala Test

implicit val testGroup: TestGroup = TestGroup("runTestFromTasty")
compileTastyInDir(s"tests${JFile.separator}run", defaultOptions,
Expand Down
2 changes: 1 addition & 1 deletion compiler/test/dotty/tools/vulpix/ParallelTesting.scala
Original file line number Diff line number Diff line change
Expand Up @@ -104,7 +104,7 @@ trait ParallelTesting extends RunnerOrchestration { self =>
|the test can be reproduced by running from SBT (prefix it with ./bin/ if you
|want to run from the command line):""".stripMargin
)
sb.append("\n\ndotc ")
sb.append("\n\nscalac ")
flags.all.foreach { arg =>
if (lineLen > maxLen) {
sb.append(delimiter)
Expand Down