Skip to content

Commit cbfc4e7

Browse files
committed
Normalize paths to exclude in stdlib-bootstrapped.
So that it is buildable on Windows.
1 parent 9f15be2 commit cbfc4e7

File tree

1 file changed

+9
-7
lines changed

1 file changed

+9
-7
lines changed

project/Build.scala

Lines changed: 9 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -969,14 +969,16 @@ object Build {
969969
((trgDir ** "*.scala") +++ (trgDir ** "*.java")).get.toSet
970970
} (Set(scalaLibrarySourcesJar)).toSeq
971971
}.taskValue,
972-
(Compile / sources) ~= (_.filterNot(file =>
972+
(Compile / sources) ~= (_.filterNot { file =>
973973
// sources from https://github.com/scala/scala/tree/2.13.x/src/library-aux
974-
file.getPath.endsWith("scala-library-src/scala/Any.scala") ||
975-
file.getPath.endsWith("scala-library-src/scala/AnyVal.scala") ||
976-
file.getPath.endsWith("scala-library-src/scala/AnyRef.scala") ||
977-
file.getPath.endsWith("scala-library-src/scala/Nothing.scala") ||
978-
file.getPath.endsWith("scala-library-src/scala/Null.scala") ||
979-
file.getPath.endsWith("scala-library-src/scala/Singleton.scala"))),
974+
val path = file.getPath.replace('\\', '/')
975+
path.endsWith("scala-library-src/scala/Any.scala") ||
976+
path.endsWith("scala-library-src/scala/AnyVal.scala") ||
977+
path.endsWith("scala-library-src/scala/AnyRef.scala") ||
978+
path.endsWith("scala-library-src/scala/Nothing.scala") ||
979+
path.endsWith("scala-library-src/scala/Null.scala") ||
980+
path.endsWith("scala-library-src/scala/Singleton.scala")
981+
}),
980982
(Compile / sources) := {
981983
val files = (Compile / sources).value
982984
val overwritenSourcesDir = (Compile / scalaSource).value

0 commit comments

Comments
 (0)