From 7f901dcbc18ffb3b3cd880e8e747b48075c0abc2 Mon Sep 17 00:00:00 2001 From: Nicolas Stucki Date: Fri, 28 Apr 2017 11:44:25 +0200 Subject: [PATCH 1/8] Make the scala-scala library a submodule. --- .gitignore | 3 --- .gitmodules | 4 ++++ project/Build.scala | 10 +++++----- scala-scala | 1 + 4 files changed, 10 insertions(+), 8 deletions(-) create mode 160000 scala-scala diff --git a/.gitignore b/.gitignore index 7508b4932d95..3648eddf0044 100644 --- a/.gitignore +++ b/.gitignore @@ -37,9 +37,6 @@ tests/partest-generated/ tests/locks/ /test-classes/ -# Used in tests -scala-scala - # Ignore output files but keep the directory out/ build/ diff --git a/.gitmodules b/.gitmodules index 37937bd8e575..242e3cd700e7 100644 --- a/.gitmodules +++ b/.gitmodules @@ -2,3 +2,7 @@ path = scala-backend url = https://github.com/lampepfl/scala.git branch = sharing-backend +[submodule "scala-scala"] + path = scala-scala + url = https://github.com/lampepfl/scala.git + branch = dotty-library diff --git a/project/Build.scala b/project/Build.scala index 5da8d8549581..c05146205bd7 100644 --- a/project/Build.scala +++ b/project/Build.scala @@ -996,12 +996,12 @@ object DottyInjectedPlugin extends AutoPlugin { } private def projectChecks(): Unit = { - val scalaScala = new File("scala-scala") - if (!scalaScala.exists()) { + val submodules = List(new File("scala-backend"), new File("scala-scala")) + if (!submodules.forall(_.exists)) { println( - s"""[WARNING] Missing `dotty/scala-scala` library - |You can clone the library with: - | > git clone -b dotty-library https://github.com/DarkDimius/scala.git ${scalaScala.getAbsolutePath} + s"""[WARNING] Missing some of the submodules + |You can initialize the modules with: + | > git submodule update --init """.stripMargin) } } diff --git a/scala-scala b/scala-scala new file mode 160000 index 000000000000..7ecfce1fb8d3 --- /dev/null +++ b/scala-scala @@ -0,0 +1 @@ +Subproject commit 7ecfce1fb8d39275f082aaa3ad4dc0eee197391c From 4dce019636cc9eb5bdc7bec90f1890b7e2d857f9 Mon Sep 17 00:00:00 2001 From: Nicolas Stucki Date: Fri, 28 Apr 2017 11:50:06 +0200 Subject: [PATCH 2/8] Add strawman as a submodule and pos compilation tests. --- .gitmodules | 4 ++++ collection-strawman | 1 + compiler/test/dotty/tools/dotc/CompilationTests.scala | 1 + project/Build.scala | 2 +- 4 files changed, 7 insertions(+), 1 deletion(-) create mode 160000 collection-strawman diff --git a/.gitmodules b/.gitmodules index 242e3cd700e7..0fcb64af65b2 100644 --- a/.gitmodules +++ b/.gitmodules @@ -6,3 +6,7 @@ path = scala-scala url = https://github.com/lampepfl/scala.git branch = dotty-library +[submodule "collection-strawman"] + path = collection-strawman + url = https://github.com/scala/collection-strawman.git + branch = master diff --git a/collection-strawman b/collection-strawman new file mode 160000 index 000000000000..3dd7d3b36ecb --- /dev/null +++ b/collection-strawman @@ -0,0 +1 @@ +Subproject commit 3dd7d3b36ecb30d35d9e2c4ccbd6b7a616d2666e diff --git a/compiler/test/dotty/tools/dotc/CompilationTests.scala b/compiler/test/dotty/tools/dotc/CompilationTests.scala index df7a1141cec9..cb2c0e2bcbd6 100644 --- a/compiler/test/dotty/tools/dotc/CompilationTests.scala +++ b/compiler/test/dotty/tools/dotc/CompilationTests.scala @@ -29,6 +29,7 @@ class CompilationTests extends ParallelTesting { @Test def compilePos: Unit = { compileList("compileStdLib", StdLibSources.whitelisted, scala2Mode.and("-migration", "-Yno-inline")) + + compileDir("../collection-strawman/src/main", defaultOptions) + compileDir("../compiler/src/dotty/tools/dotc/ast", defaultOptions) + compileDir("../compiler/src/dotty/tools/dotc/config", defaultOptions) + compileDir("../compiler/src/dotty/tools/dotc/core", allowDeepSubtypes) + diff --git a/project/Build.scala b/project/Build.scala index c05146205bd7..99c57c776926 100644 --- a/project/Build.scala +++ b/project/Build.scala @@ -996,7 +996,7 @@ object DottyInjectedPlugin extends AutoPlugin { } private def projectChecks(): Unit = { - val submodules = List(new File("scala-backend"), new File("scala-scala")) + val submodules = List(new File("scala-backend"), new File("scala-scala"), new File("collection-strawman")) if (!submodules.forall(_.exists)) { println( s"""[WARNING] Missing some of the submodules From edacaa9df0b6b3ee5b48be3ed8a571dc162f5458 Mon Sep 17 00:00:00 2001 From: Nicolas Stucki Date: Fri, 28 Apr 2017 11:59:21 +0200 Subject: [PATCH 3/8] Remove update script. --- .drone.yml | 1 - project/scripts/updateScalaLibrary | 23 ----------------------- 2 files changed, 24 deletions(-) delete mode 100755 project/scripts/updateScalaLibrary diff --git a/.drone.yml b/.drone.yml index aa248459bcb1..e40c2856dbc4 100644 --- a/.drone.yml +++ b/.drone.yml @@ -13,7 +13,6 @@ pipeline: commands: - ln -s /var/cache/drone/scala-scala scala-scala - ln -s /var/cache/drone/ivy2 "$HOME/.ivy2" - - ./project/scripts/updateScalaLibrary - sbt -J-Xmx4096m -J-XX:ReservedCodeCacheSize=512m -J-XX:MaxMetaspaceSize=1024m -Ddotty.drone.mem=4096m "${CI_TEST}" when: branch: diff --git a/project/scripts/updateScalaLibrary b/project/scripts/updateScalaLibrary deleted file mode 100755 index 3aad6aa867ef..000000000000 --- a/project/scripts/updateScalaLibrary +++ /dev/null @@ -1,23 +0,0 @@ -#!/usr/bin/env bash - -update() { - [[ -d $baseDir ]] || mkdir -p $baseDir - cd $baseDir - - if [ ! -d $baseDir/$3 ]; then git clone "https://github.com/$1/$2.git" $3; fi - - cd $3 - - git fetch --tags "https://github.com/$1/$2.git" - (git fetch "https://github.com/$1/$2.git" $4 && git checkout -fq FETCH_HEAD) #|| git checkout -fq $4 # || fallback is for local testing on tag - git reset --hard - echo updated $1/$2:$4 under $3. Last commits: - git --no-pager log --pretty=format:"%h - %an, %aD : %s" -n 10 # show last commits - cd - -} - -export LC_ALL=en_US.UTF-8 - -baseDir=`pwd` - -update DarkDimius scala scala-scala dotty-library From f91bfca86d12bb7206539ab799e6c26bc4c8726a Mon Sep 17 00:00:00 2001 From: Nicolas Stucki Date: Fri, 28 Apr 2017 12:08:53 +0200 Subject: [PATCH 4/8] Update doc. --- docs/docs/contributing/workflow.md | 2 -- 1 file changed, 2 deletions(-) diff --git a/docs/docs/contributing/workflow.md b/docs/docs/contributing/workflow.md index a8001366ae41..86320426f972 100644 --- a/docs/docs/contributing/workflow.md +++ b/docs/docs/contributing/workflow.md @@ -11,8 +11,6 @@ This document details common workflow patterns when working with Dotty. # Start by cloning the repository: git clone --recursive https://github.com/lampepfl/dotty.git cd dotty -# Clone dotty-compatible stdlib. Needed for running the test suite. -git clone -b dotty-library https://github.com/DarkDimius/scala.git scala-scala ``` ## Compiling files with dotc ## From 6a92606407d51b7a1d039b69bfdb3417f3a237f6 Mon Sep 17 00:00:00 2001 From: Nicolas Stucki Date: Fri, 28 Apr 2017 13:16:14 +0200 Subject: [PATCH 5/8] Cleanup --- .drone.yml | 1 - project/Build.scala | 2 +- 2 files changed, 1 insertion(+), 2 deletions(-) diff --git a/.drone.yml b/.drone.yml index e40c2856dbc4..8ef737a3da79 100644 --- a/.drone.yml +++ b/.drone.yml @@ -11,7 +11,6 @@ pipeline: image: lampepfl/dotty:24-04-2017 pull: true commands: - - ln -s /var/cache/drone/scala-scala scala-scala - ln -s /var/cache/drone/ivy2 "$HOME/.ivy2" - sbt -J-Xmx4096m -J-XX:ReservedCodeCacheSize=512m -J-XX:MaxMetaspaceSize=1024m -Ddotty.drone.mem=4096m "${CI_TEST}" when: diff --git a/project/Build.scala b/project/Build.scala index 99c57c776926..589cd506f064 100644 --- a/project/Build.scala +++ b/project/Build.scala @@ -997,7 +997,7 @@ object DottyInjectedPlugin extends AutoPlugin { private def projectChecks(): Unit = { val submodules = List(new File("scala-backend"), new File("scala-scala"), new File("collection-strawman")) - if (!submodules.forall(_.exists)) { + if (!submodules.forall(f => f.exists && f.listFiles().nonEmpty)) { println( s"""[WARNING] Missing some of the submodules |You can initialize the modules with: From 04eee0d3f0e2d088632f20fb35059ddf60beda80 Mon Sep 17 00:00:00 2001 From: Nicolas Stucki Date: Fri, 28 Apr 2017 13:18:36 +0200 Subject: [PATCH 6/8] Rename scala-scala to scala-library. --- .gitmodules | 4 ++-- compiler/test/dotc/tests.scala | 22 +++++++++---------- compiler/test/dotty/tools/StdLibSources.scala | 2 +- .../dotty/tools/dotc/CompilationTests.scala | 22 +++++++++---------- .../tools/dotc/parsing/ScannerTest.scala | 2 +- .../tools/dotc/parsing/desugarPackage.scala | 2 +- .../tools/dotc/parsing/parsePackage.scala | 2 +- doc-tool/test/UsecaseTest.scala | 4 ++-- project/Build.scala | 2 +- scala-library | 1 + scala-scala | 1 - 11 files changed, 32 insertions(+), 32 deletions(-) create mode 160000 scala-library delete mode 160000 scala-scala diff --git a/.gitmodules b/.gitmodules index 0fcb64af65b2..8a2e8086487a 100644 --- a/.gitmodules +++ b/.gitmodules @@ -2,8 +2,8 @@ path = scala-backend url = https://github.com/lampepfl/scala.git branch = sharing-backend -[submodule "scala-scala"] - path = scala-scala +[submodule "scala-library"] + path = scala-library url = https://github.com/lampepfl/scala.git branch = dotty-library [submodule "collection-strawman"] diff --git a/compiler/test/dotc/tests.scala b/compiler/test/dotc/tests.scala index 3c07df88a952..3d05515fa0db 100644 --- a/compiler/test/dotc/tests.scala +++ b/compiler/test/dotc/tests.scala @@ -215,18 +215,18 @@ class tests extends CompilerTest { @Test def compileMixed = compileLine( """../tests/pos/B.scala - |../scala-scala/src/library/scala/collection/immutable/Seq.scala - |../scala-scala/src/library/scala/collection/parallel/ParSeq.scala - |../scala-scala/src/library/scala/package.scala - |../scala-scala/src/library/scala/collection/GenSeqLike.scala - |../scala-scala/src/library/scala/collection/SeqLike.scala - |../scala-scala/src/library/scala/collection/generic/GenSeqFactory.scala""".stripMargin) - @Test def compileIndexedSeq = compileLine("../scala-scala/src/library/scala/collection/immutable/IndexedSeq.scala") - @Test def compileParSetLike = compileLine("../scala-scala/src/library/scala/collection/parallel/mutable/ParSetLike.scala") + |../scala-library/src/library/scala/collection/immutable/Seq.scala + |../scala-library/src/library/scala/collection/parallel/ParSeq.scala + |../scala-library/src/library/scala/package.scala + |../scala-library/src/library/scala/collection/GenSeqLike.scala + |../scala-library/src/library/scala/collection/SeqLike.scala + |../scala-library/src/library/scala/collection/generic/GenSeqFactory.scala""".stripMargin) + @Test def compileIndexedSeq = compileLine("../scala-library/src/library/scala/collection/immutable/IndexedSeq.scala") + @Test def compileParSetLike = compileLine("../scala-library/src/library/scala/collection/parallel/mutable/ParSetLike.scala") @Test def compileParSetSubset = compileLine( - """../scala-scala/src/library/scala/collection/parallel/mutable/ParSetLike.scala - |../scala-scala/src/library/scala/collection/parallel/mutable/ParSet.scala - |../scala-scala/src/library/scala/collection/mutable/SetLike.scala""".stripMargin)(scala2mode ++ defaultOptions) + """../scala-library/src/library/scala/collection/parallel/mutable/ParSetLike.scala + |../scala-library/src/library/scala/collection/parallel/mutable/ParSet.scala + |../scala-library/src/library/scala/collection/mutable/SetLike.scala""".stripMargin)(scala2mode ++ defaultOptions) @Test def dottyBooted = { dottyBootedLib diff --git a/compiler/test/dotty/tools/StdLibSources.scala b/compiler/test/dotty/tools/StdLibSources.scala index 0c11210586a3..d4dd1ba214b0 100644 --- a/compiler/test/dotty/tools/StdLibSources.scala +++ b/compiler/test/dotty/tools/StdLibSources.scala @@ -10,7 +10,7 @@ object StdLibSources { /* For debug only */ private val useExplicitWhiteList = false - private final val stdLibPath = "../scala-scala/src/library/" + private final val stdLibPath = "../scala-library/src/library/" def blacklistFile: String = "../compiler/test/dotc/scala-collections.blacklist" private def whitelistFile: String = "../compiler/test/dotc/scala-collections.whitelist" diff --git a/compiler/test/dotty/tools/dotc/CompilationTests.scala b/compiler/test/dotty/tools/dotc/CompilationTests.scala index cb2c0e2bcbd6..a43e15525375 100644 --- a/compiler/test/dotty/tools/dotc/CompilationTests.scala +++ b/compiler/test/dotty/tools/dotc/CompilationTests.scala @@ -50,24 +50,24 @@ class CompilationTests extends ParallelTesting { "compileMixed", List( "../tests/pos/B.scala", - "../scala-scala/src/library/scala/collection/immutable/Seq.scala", - "../scala-scala/src/library/scala/collection/parallel/ParSeq.scala", - "../scala-scala/src/library/scala/package.scala", - "../scala-scala/src/library/scala/collection/GenSeqLike.scala", - "../scala-scala/src/library/scala/collection/SeqLike.scala", - "../scala-scala/src/library/scala/collection/generic/GenSeqFactory.scala" + "../scala-library/src/library/scala/collection/immutable/Seq.scala", + "../scala-library/src/library/scala/collection/parallel/ParSeq.scala", + "../scala-library/src/library/scala/package.scala", + "../scala-library/src/library/scala/collection/GenSeqLike.scala", + "../scala-library/src/library/scala/collection/SeqLike.scala", + "../scala-library/src/library/scala/collection/generic/GenSeqFactory.scala" ), defaultOptions ) + compileFilesInDir("../tests/pos-special/spec-t5545", defaultOptions) + - compileFile("../scala-scala/src/library/scala/collection/immutable/IndexedSeq.scala", defaultOptions) + - compileFile("../scala-scala/src/library/scala/collection/parallel/mutable/ParSetLike.scala", defaultOptions) + + compileFile("../scala-library/src/library/scala/collection/immutable/IndexedSeq.scala", defaultOptions) + + compileFile("../scala-library/src/library/scala/collection/parallel/mutable/ParSetLike.scala", defaultOptions) + compileList( "parSetSubset", List( - "../scala-scala/src/library/scala/collection/parallel/mutable/ParSetLike.scala", - "../scala-scala/src/library/scala/collection/parallel/mutable/ParSet.scala", - "../scala-scala/src/library/scala/collection/mutable/SetLike.scala" + "../scala-library/src/library/scala/collection/parallel/mutable/ParSetLike.scala", + "../scala-library/src/library/scala/collection/parallel/mutable/ParSet.scala", + "../scala-library/src/library/scala/collection/mutable/SetLike.scala" ), scala2Mode ) + diff --git a/compiler/test/dotty/tools/dotc/parsing/ScannerTest.scala b/compiler/test/dotty/tools/dotc/parsing/ScannerTest.scala index b024a63dba2f..17387c21b055 100644 --- a/compiler/test/dotty/tools/dotc/parsing/ScannerTest.scala +++ b/compiler/test/dotty/tools/dotc/parsing/ScannerTest.scala @@ -60,6 +60,6 @@ class ScannerTest extends DottyTest { @Test def scanScala() = { - scanDir("../scala-scala/src") + scanDir("../scala-library/src") } } diff --git a/compiler/test/dotty/tools/dotc/parsing/desugarPackage.scala b/compiler/test/dotty/tools/dotc/parsing/desugarPackage.scala index 84bf7a2d174e..55adb8786c67 100644 --- a/compiler/test/dotty/tools/dotc/parsing/desugarPackage.scala +++ b/compiler/test/dotty/tools/dotc/parsing/desugarPackage.scala @@ -12,7 +12,7 @@ object desugarPackage extends DeSugarTest { val start = System.nanoTime() val startNodes = Trees.ntrees parseDir("./src") - parseDir("./scala-scala/src") + parseDir("./scala-library/src") val ms1 = (System.nanoTime() - start)/1000000 val nodes = Trees.ntrees val buf = parsedTrees map desugarTree diff --git a/compiler/test/dotty/tools/dotc/parsing/parsePackage.scala b/compiler/test/dotty/tools/dotc/parsing/parsePackage.scala index df5368ffe337..81fa97d13198 100644 --- a/compiler/test/dotty/tools/dotc/parsing/parsePackage.scala +++ b/compiler/test/dotty/tools/dotc/parsing/parsePackage.scala @@ -68,7 +68,7 @@ object parsePackage extends ParserTest { nodes = 0 val start = System.nanoTime() parseDir("./src") - parseDir("./scala-scala/src") + parseDir("./scala-library/src") val ms1 = (System.nanoTime() - start)/1000000 val buf = parsedTrees map transformer.transform val ms2 = (System.nanoTime() - start)/1000000 diff --git a/doc-tool/test/UsecaseTest.scala b/doc-tool/test/UsecaseTest.scala index 4eb072b98ff8..65532dc48a98 100644 --- a/doc-tool/test/UsecaseTest.scala +++ b/doc-tool/test/UsecaseTest.scala @@ -223,12 +223,12 @@ class UsecaseTest extends DottyDocTest { } @Test def checkIterator = - checkFiles("../scala-scala/src/library/scala/collection/Iterator.scala" :: Nil) { _ => + checkFiles("../scala-library/src/library/scala/collection/Iterator.scala" :: Nil) { _ => // success if typer throws no errors! :) } @Test def checkIterableLike = - checkFiles("../scala-scala/src/library/scala/collection/IterableLike.scala" :: Nil) { _ => + checkFiles("../scala-library/src/library/scala/collection/IterableLike.scala" :: Nil) { _ => // success if typer throws no errors! :) } } diff --git a/project/Build.scala b/project/Build.scala index 589cd506f064..93c4ef03fdd7 100644 --- a/project/Build.scala +++ b/project/Build.scala @@ -996,7 +996,7 @@ object DottyInjectedPlugin extends AutoPlugin { } private def projectChecks(): Unit = { - val submodules = List(new File("scala-backend"), new File("scala-scala"), new File("collection-strawman")) + val submodules = List(new File("scala-backend"), new File("scala-library"), new File("collection-strawman")) if (!submodules.forall(f => f.exists && f.listFiles().nonEmpty)) { println( s"""[WARNING] Missing some of the submodules diff --git a/scala-library b/scala-library new file mode 160000 index 000000000000..c14809b706da --- /dev/null +++ b/scala-library @@ -0,0 +1 @@ +Subproject commit c14809b706da013349581c713a7fde04ed47d2d3 diff --git a/scala-scala b/scala-scala deleted file mode 160000 index 7ecfce1fb8d3..000000000000 --- a/scala-scala +++ /dev/null @@ -1 +0,0 @@ -Subproject commit 7ecfce1fb8d39275f082aaa3ad4dc0eee197391c From 7575916d9708570ab6083fc759c19398d7990b4e Mon Sep 17 00:00:00 2001 From: Nicolas Stucki Date: Tue, 2 May 2017 17:57:34 +0200 Subject: [PATCH 7/8] Put submodule checks in sbt onLoad. --- project/Build.scala | 11 +++++------ 1 file changed, 5 insertions(+), 6 deletions(-) diff --git a/project/Build.scala b/project/Build.scala index 93c4ef03fdd7..f26e78b4926d 100644 --- a/project/Build.scala +++ b/project/Build.scala @@ -24,8 +24,6 @@ object ExposedValues extends AutoPlugin { object Build { - projectChecks() - val scalacVersion = "2.11.11" // Do not rename, this is grepped in bin/common. val dottyOrganization = "ch.epfl.lamp" @@ -234,7 +232,7 @@ object Build { settings(commonNonBootstrappedSettings). settings( triggeredMessage in ThisBuild := Watched.clearWhenTriggered, - + submoduleChecks, addCommandAlias("run", "dotty-compiler/run") ++ addCommandAlias("legacyTests", "dotty-compiler/testOnly dotc.tests") ) @@ -995,14 +993,15 @@ object DottyInjectedPlugin extends AutoPlugin { )) } - private def projectChecks(): Unit = { + lazy val submoduleChecks = onLoad in Global := (onLoad in Global).value andThen { state => val submodules = List(new File("scala-backend"), new File("scala-library"), new File("collection-strawman")) if (!submodules.forall(f => f.exists && f.listFiles().nonEmpty)) { - println( - s"""[WARNING] Missing some of the submodules + sLog.value.log(Level.Error, + s"""Missing some of the submodules |You can initialize the modules with: | > git submodule update --init """.stripMargin) } + state } } From 5420a0398218cfcd3e00185bd7ec0a60bcdfeac5 Mon Sep 17 00:00:00 2001 From: Nicolas Stucki Date: Thu, 4 May 2017 13:30:44 +0200 Subject: [PATCH 8/8] Fix name clashes on sbt subprojects and git submodules. --- .gitmodules | 4 ++-- compiler/test/dotc/tests.scala | 22 +++++++++---------- compiler/test/dotty/tools/StdLibSources.scala | 2 +- .../dotty/tools/dotc/CompilationTests.scala | 22 +++++++++---------- .../tools/dotc/parsing/ScannerTest.scala | 2 +- .../tools/dotc/parsing/desugarPackage.scala | 2 +- .../tools/dotc/parsing/parsePackage.scala | 2 +- doc-tool/test/UsecaseTest.scala | 4 ++-- project/Build.scala | 4 ++-- scala-library => scala2-library | 0 10 files changed, 32 insertions(+), 32 deletions(-) rename scala-library => scala2-library (100%) diff --git a/.gitmodules b/.gitmodules index 8a2e8086487a..f5ea01ebbaab 100644 --- a/.gitmodules +++ b/.gitmodules @@ -2,8 +2,8 @@ path = scala-backend url = https://github.com/lampepfl/scala.git branch = sharing-backend -[submodule "scala-library"] - path = scala-library +[submodule "scala2-library"] + path = scala2-library url = https://github.com/lampepfl/scala.git branch = dotty-library [submodule "collection-strawman"] diff --git a/compiler/test/dotc/tests.scala b/compiler/test/dotc/tests.scala index 3d05515fa0db..4af6277f05f4 100644 --- a/compiler/test/dotc/tests.scala +++ b/compiler/test/dotc/tests.scala @@ -215,18 +215,18 @@ class tests extends CompilerTest { @Test def compileMixed = compileLine( """../tests/pos/B.scala - |../scala-library/src/library/scala/collection/immutable/Seq.scala - |../scala-library/src/library/scala/collection/parallel/ParSeq.scala - |../scala-library/src/library/scala/package.scala - |../scala-library/src/library/scala/collection/GenSeqLike.scala - |../scala-library/src/library/scala/collection/SeqLike.scala - |../scala-library/src/library/scala/collection/generic/GenSeqFactory.scala""".stripMargin) - @Test def compileIndexedSeq = compileLine("../scala-library/src/library/scala/collection/immutable/IndexedSeq.scala") - @Test def compileParSetLike = compileLine("../scala-library/src/library/scala/collection/parallel/mutable/ParSetLike.scala") + |../scala2-library/src/library/scala/collection/immutable/Seq.scala + |../scala2-library/src/library/scala/collection/parallel/ParSeq.scala + |../scala2-library/src/library/scala/package.scala + |../scala2-library/src/library/scala/collection/GenSeqLike.scala + |../scala2-library/src/library/scala/collection/SeqLike.scala + |../scala2-library/src/library/scala/collection/generic/GenSeqFactory.scala""".stripMargin) + @Test def compileIndexedSeq = compileLine("../scala2-library/src/library/scala/collection/immutable/IndexedSeq.scala") + @Test def compileParSetLike = compileLine("../scala2-library/src/library/scala/collection/parallel/mutable/ParSetLike.scala") @Test def compileParSetSubset = compileLine( - """../scala-library/src/library/scala/collection/parallel/mutable/ParSetLike.scala - |../scala-library/src/library/scala/collection/parallel/mutable/ParSet.scala - |../scala-library/src/library/scala/collection/mutable/SetLike.scala""".stripMargin)(scala2mode ++ defaultOptions) + """../scala2-library/src/library/scala/collection/parallel/mutable/ParSetLike.scala + |../scala2-library/src/library/scala/collection/parallel/mutable/ParSet.scala + |../scala2-library/src/library/scala/collection/mutable/SetLike.scala""".stripMargin)(scala2mode ++ defaultOptions) @Test def dottyBooted = { dottyBootedLib diff --git a/compiler/test/dotty/tools/StdLibSources.scala b/compiler/test/dotty/tools/StdLibSources.scala index d4dd1ba214b0..2b8a9574b758 100644 --- a/compiler/test/dotty/tools/StdLibSources.scala +++ b/compiler/test/dotty/tools/StdLibSources.scala @@ -10,7 +10,7 @@ object StdLibSources { /* For debug only */ private val useExplicitWhiteList = false - private final val stdLibPath = "../scala-library/src/library/" + private final val stdLibPath = "../scala2-library/src/library/" def blacklistFile: String = "../compiler/test/dotc/scala-collections.blacklist" private def whitelistFile: String = "../compiler/test/dotc/scala-collections.whitelist" diff --git a/compiler/test/dotty/tools/dotc/CompilationTests.scala b/compiler/test/dotty/tools/dotc/CompilationTests.scala index a43e15525375..8a2cc2130cb8 100644 --- a/compiler/test/dotty/tools/dotc/CompilationTests.scala +++ b/compiler/test/dotty/tools/dotc/CompilationTests.scala @@ -50,24 +50,24 @@ class CompilationTests extends ParallelTesting { "compileMixed", List( "../tests/pos/B.scala", - "../scala-library/src/library/scala/collection/immutable/Seq.scala", - "../scala-library/src/library/scala/collection/parallel/ParSeq.scala", - "../scala-library/src/library/scala/package.scala", - "../scala-library/src/library/scala/collection/GenSeqLike.scala", - "../scala-library/src/library/scala/collection/SeqLike.scala", - "../scala-library/src/library/scala/collection/generic/GenSeqFactory.scala" + "../scala2-library/src/library/scala/collection/immutable/Seq.scala", + "../scala2-library/src/library/scala/collection/parallel/ParSeq.scala", + "../scala2-library/src/library/scala/package.scala", + "../scala2-library/src/library/scala/collection/GenSeqLike.scala", + "../scala2-library/src/library/scala/collection/SeqLike.scala", + "../scala2-library/src/library/scala/collection/generic/GenSeqFactory.scala" ), defaultOptions ) + compileFilesInDir("../tests/pos-special/spec-t5545", defaultOptions) + - compileFile("../scala-library/src/library/scala/collection/immutable/IndexedSeq.scala", defaultOptions) + - compileFile("../scala-library/src/library/scala/collection/parallel/mutable/ParSetLike.scala", defaultOptions) + + compileFile("../scala2-library/src/library/scala/collection/immutable/IndexedSeq.scala", defaultOptions) + + compileFile("../scala2-library/src/library/scala/collection/parallel/mutable/ParSetLike.scala", defaultOptions) + compileList( "parSetSubset", List( - "../scala-library/src/library/scala/collection/parallel/mutable/ParSetLike.scala", - "../scala-library/src/library/scala/collection/parallel/mutable/ParSet.scala", - "../scala-library/src/library/scala/collection/mutable/SetLike.scala" + "../scala2-library/src/library/scala/collection/parallel/mutable/ParSetLike.scala", + "../scala2-library/src/library/scala/collection/parallel/mutable/ParSet.scala", + "../scala2-library/src/library/scala/collection/mutable/SetLike.scala" ), scala2Mode ) + diff --git a/compiler/test/dotty/tools/dotc/parsing/ScannerTest.scala b/compiler/test/dotty/tools/dotc/parsing/ScannerTest.scala index 17387c21b055..48ac280d0578 100644 --- a/compiler/test/dotty/tools/dotc/parsing/ScannerTest.scala +++ b/compiler/test/dotty/tools/dotc/parsing/ScannerTest.scala @@ -60,6 +60,6 @@ class ScannerTest extends DottyTest { @Test def scanScala() = { - scanDir("../scala-library/src") + scanDir("../scala2-library/src") } } diff --git a/compiler/test/dotty/tools/dotc/parsing/desugarPackage.scala b/compiler/test/dotty/tools/dotc/parsing/desugarPackage.scala index 55adb8786c67..0ca15b9172c9 100644 --- a/compiler/test/dotty/tools/dotc/parsing/desugarPackage.scala +++ b/compiler/test/dotty/tools/dotc/parsing/desugarPackage.scala @@ -12,7 +12,7 @@ object desugarPackage extends DeSugarTest { val start = System.nanoTime() val startNodes = Trees.ntrees parseDir("./src") - parseDir("./scala-library/src") + parseDir("./scala2-library/src") val ms1 = (System.nanoTime() - start)/1000000 val nodes = Trees.ntrees val buf = parsedTrees map desugarTree diff --git a/compiler/test/dotty/tools/dotc/parsing/parsePackage.scala b/compiler/test/dotty/tools/dotc/parsing/parsePackage.scala index 81fa97d13198..9e0e2829233e 100644 --- a/compiler/test/dotty/tools/dotc/parsing/parsePackage.scala +++ b/compiler/test/dotty/tools/dotc/parsing/parsePackage.scala @@ -68,7 +68,7 @@ object parsePackage extends ParserTest { nodes = 0 val start = System.nanoTime() parseDir("./src") - parseDir("./scala-library/src") + parseDir("./scala2-library/src") val ms1 = (System.nanoTime() - start)/1000000 val buf = parsedTrees map transformer.transform val ms2 = (System.nanoTime() - start)/1000000 diff --git a/doc-tool/test/UsecaseTest.scala b/doc-tool/test/UsecaseTest.scala index 65532dc48a98..f0f38d09f79d 100644 --- a/doc-tool/test/UsecaseTest.scala +++ b/doc-tool/test/UsecaseTest.scala @@ -223,12 +223,12 @@ class UsecaseTest extends DottyDocTest { } @Test def checkIterator = - checkFiles("../scala-library/src/library/scala/collection/Iterator.scala" :: Nil) { _ => + checkFiles("../scala2-library/src/library/scala/collection/Iterator.scala" :: Nil) { _ => // success if typer throws no errors! :) } @Test def checkIterableLike = - checkFiles("../scala-library/src/library/scala/collection/IterableLike.scala" :: Nil) { _ => + checkFiles("../scala2-library/src/library/scala/collection/IterableLike.scala" :: Nil) { _ => // success if typer throws no errors! :) } } diff --git a/project/Build.scala b/project/Build.scala index f26e78b4926d..f5baa18b8c17 100644 --- a/project/Build.scala +++ b/project/Build.scala @@ -150,7 +150,7 @@ object Build { scalacOptions ++= Seq("-bootclasspath", sys.props("sun.boot.class.path")), // sbt gets very unhappy if two projects use the same target - target := baseDirectory.value / ".." / "out" / name.value, + target := baseDirectory.value / ".." / "out" / "bootstrap" / name.value, // The non-bootstrapped dotty-library is not necessary when bootstrapping dotty autoScalaLibrary := false, @@ -994,7 +994,7 @@ object DottyInjectedPlugin extends AutoPlugin { } lazy val submoduleChecks = onLoad in Global := (onLoad in Global).value andThen { state => - val submodules = List(new File("scala-backend"), new File("scala-library"), new File("collection-strawman")) + val submodules = List(new File("scala-backend"), new File("scala2-library"), new File("collection-strawman")) if (!submodules.forall(f => f.exists && f.listFiles().nonEmpty)) { sLog.value.log(Level.Error, s"""Missing some of the submodules diff --git a/scala-library b/scala2-library similarity index 100% rename from scala-library rename to scala2-library