Skip to content

Commit 5fc264a

Browse files
committed
Move compiler and compiler tests to compiler dir
1 parent 83ff7a2 commit 5fc264a

File tree

327 files changed

+3239
-74
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

327 files changed

+3239
-74
lines changed

bench/src/test/scala/Benchmarks.scala

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ import org.scalameter.PerformanceTest.OnlineRegressionReport
66
import org.scalameter.api._
77
import org.scalameter.{Context, History, currentContext, persistence}
88
import org.scalameter.reporting.RegressionReporter.Tester
9-
import test.CompilerTest
9+
import dotty.tools.dotc.CompilerTest
1010

1111
import scala.io.Source
1212

@@ -46,13 +46,14 @@ object BenchTests extends OnlineRegressionReport {
4646
implicit val defaultOptions = List("-d", outputDir)
4747
val scala2mode = List("-language:Scala2")
4848

49-
val dottyDir = "./src/dotty/"
49+
val dottyDir = "../compiler/src/dotty/"
5050

51-
val stdlibFiles = Source.fromFile("./test/dotc/scala-collections.whitelist", "UTF8").getLines()
51+
val stdlibFiles = Source.fromFile("../compiler/test/dotc/scala-collections.whitelist", "UTF8").getLines()
5252
.map(_.trim) // allow identation
5353
.filter(!_.startsWith("#")) // allow comment lines prefixed by #
5454
.map(_.takeWhile(_ != '#').trim) // allow comments in the end of line
5555
.filter(_.nonEmpty)
56+
.map("." + _)
5657
.toList
5758

5859
def stdLib = compiler.compileList("compileStdLib", stdlibFiles, "-migration" :: scala2mode)

bin/common

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -86,15 +86,15 @@ function build_all {
8686
printf "done\n"
8787

8888
printf "Building dotty-compiler..."
89-
MAIN_JAR=$(build_jar dotty-compiler/package "target/scala-$SCALA_BINARY_VERSION")
89+
MAIN_JAR=$(build_jar dotty-compiler/package "compiler/target/scala-$SCALA_BINARY_VERSION")
9090
printf "done\n"
9191

9292
printf "Building dotty library..."
9393
DOTTY_LIB_JAR=$(build_jar dotty-library/package "library/target/scala-$SCALA_BINARY_VERSION")
9494
printf "done\n"
9595

9696
printf "Building tests..."
97-
TEST_JAR=$(build_jar test:package "target/scala-$SCALA_BINARY_VERSION" '/dotty.*-tests\.jar/p')
97+
TEST_JAR=$(build_jar test:package "compiler/target/scala-$SCALA_BINARY_VERSION" '/dotty.*-tests\.jar/p')
9898
printf "done\n"
9999

100100
update_packages
@@ -130,10 +130,10 @@ function check_jar {
130130
fi
131131
}
132132

133-
check_jar "dotty-interfaces" $INTERFACES_JAR "interfaces" 'INTERFACES_JAR=$(build_jar dotty-interfaces/package interfaces/target)'
134-
check_jar "dotty" $MAIN_JAR "src" 'MAIN_JAR=$(build_jar dotty-compiler/package target/scala-$SCALA_BINARY_VERSION)'
135-
check_jar "dotty-library" $DOTTY_LIB_JAR "library" 'DOTTY_LIB_JAR=$(build_jar dotty-library/package library/target/scala-$SCALA_BINARY_VERSION)'
136-
check_jar "dotty-tests" $TEST_JAR "test" 'TEST_JAR=$(build_jar test:package target/scala-$SCALA_BINARY_VERSION /dotty.*-tests\.jar/p)'
133+
check_jar "dotty-interfaces" $INTERFACES_JAR "interfaces/src" 'INTERFACES_JAR=$(build_jar dotty-interfaces/package interfaces/target)'
134+
check_jar "dotty" $MAIN_JAR "compiler/src" 'MAIN_JAR=$(build_jar dotty-compiler/package compiler/target/scala-$SCALA_BINARY_VERSION)'
135+
check_jar "dotty-library" $DOTTY_LIB_JAR "library/src" 'DOTTY_LIB_JAR=$(build_jar dotty-library/package library/target/scala-$SCALA_BINARY_VERSION)'
136+
check_jar "dotty-tests" $TEST_JAR "compiler/test" 'TEST_JAR=$(build_jar dotty-compiler/test:package compiler/target/scala-$SCALA_BINARY_VERSION /dotty.*-tests\.jar/p)'
137137

138138
# Autodetecting the scala-library location, in case it wasn't provided by an environment variable
139139
if [ "$SCALA_LIBRARY_JAR" == "" ]; then

bin/test/TestScripts.scala

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -28,13 +28,13 @@ class TestScripts {
2828
}
2929

3030
try {
31-
for (jar <- Source.fromFile("../.packages").getLines())
31+
for (jar <- Source.fromFile("./.packages").getLines())
3232
delete(jar)
3333

34-
delete("../.packages")
35-
delete("./src/dotty/tools/dotc/Dummy.scala")
36-
delete("HelloWorld.class")
37-
delete("HelloWorld$.class")
34+
delete("./.packages")
35+
delete("./compiler/src/dotty/tools/dotc/Dummy.scala")
36+
delete("./HelloWorld.class")
37+
delete("./HelloWorld$.class")
3838
} catch {
3939
case _: FileNotFoundException => ()
4040
}
@@ -66,11 +66,11 @@ class TestScripts {
6666
* rebuild dotty if needed
6767
*/
6868
@Test def rebuildIfNecessary = doUnlessWindows {
69-
val (retFirstBuild, _) = executeScript("./bin/dotc ./tests/pos/HelloWorld.scala")
70-
assert(retFirstBuild == 0, "building dotc failed")
69+
val (retFirstBuild, out1) = executeScript("./bin/dotc ./tests/pos/HelloWorld.scala")
70+
assert(retFirstBuild == 0, s"building dotc failed: $out1")
7171

7272
// Create a new file to force rebuild
73-
new JFile("./src/dotty/tools/dotc/Dummy.scala").createNewFile()
73+
new JFile("./compiler/src/dotty/tools/dotc/Dummy.scala").createNewFile()
7474

7575
val (retSecondBuild, output) = executeScript("./bin/dotc ./tests/pos/HelloWorld.scala")
7676
assert(

compiler/after-pickling.txt

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
[cannot display due to dotty.tools.dotc.core.Denotations$StaleSymbol: stale symbol; method <init>#55366 in class sharable, defined in Period(1..6, run = 2), is referred to in run Period(1..1, run = 3), raw string = dotty.tools.dotc.printing.Formatting$StringFormatter@7a82387f]

0 commit comments

Comments
 (0)