Skip to content

Move files from library/src-3.x to library/src #6818

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
Jul 8, 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
2 changes: 1 addition & 1 deletion compiler/test/dotty/tools/dotc/CompilationTests.scala
Original file line number Diff line number Diff line change
Expand Up @@ -250,7 +250,7 @@ class CompilationTests extends ParallelTesting {
Array("-Ycheck-reentrant", "-Yemit-tasty-in-class")
)

val libraryDirs = List(Paths.get("library/src"), Paths.get("library/src-3.x"), Paths.get("library/src-bootstrapped"))
val libraryDirs = List(Paths.get("library/src"), Paths.get("library/src-bootstrapped"))
val librarySources = libraryDirs.flatMap(sources(_))

val lib =
Expand Down
File renamed without changes.
File renamed without changes.
19 changes: 3 additions & 16 deletions project/Build.scala
Original file line number Diff line number Diff line change
Expand Up @@ -708,28 +708,15 @@ object Build {
// Needed so that the library sources are visible when `dotty.tools.dotc.core.Definitions#init` is called
scalacOptions in Compile ++= Seq("-sourcepath", (scalaSource in Compile).value.getAbsolutePath),

// To be removed once we stop cross-compiling with Scala 2
unmanagedSourceDirectories in Compile += {
val baseDir = baseDirectory.value
if (!isDotty.value)
baseDir / "src-2.x"
else
baseDir / "src-3.x"
},

// Add version-specific source directories:
// - files in src-non-bootstrapped will only be compiled by the reference compiler
// - files in src-bootstrapped will only be compiled by the current dotty compiler (non-bootstrapped and bootstrapped)
unmanagedSourceDirectories in Compile ++= {
val baseDir = baseDirectory.value
if (isDotty.value) {
if (scalaVersion.value == referenceVersion)
Seq(baseDir / "src-non-bootstrapped")
else
Seq(baseDir / "src-bootstrapped")
}
if (scalaVersion.value == referenceVersion)
Seq(baseDir / "src-non-bootstrapped")
else
Seq()
Seq(baseDir / "src-bootstrapped")
}
)

Expand Down