Skip to content

Commit e295a39

Browse files
committed
[do not merge] hack to patch scalajs-ir sources
1 parent 68a24c0 commit e295a39

File tree

1 file changed

+13
-0
lines changed

1 file changed

+13
-0
lines changed

project/Build.scala

+13
Original file line numberDiff line numberDiff line change
@@ -702,6 +702,19 @@ object Build {
702702
IO.createDirectory(trgDir)
703703
IO.unzip(scalaJSIRSourcesJar, trgDir)
704704

705+
// TODO hack to patch scalajs-ir to allow compilation with stricter pattern binding rules
706+
val fileToPatch = trgDir / "org" / "scalajs" / "ir" / "Trees.scala"
707+
val lines = IO.readLines(fileToPatch).map { line =>
708+
if (line.endsWith("= propName"))
709+
line + ": @unchecked"
710+
else
711+
line
712+
}
713+
IO.withTemporaryFile("Trees.scala", "patch") { f =>
714+
IO.writeLines(f, lines)
715+
IO.copyFile(f, fileToPatch)
716+
}
717+
705718
(trgDir ** "*.scala").get.toSet
706719
} (Set(scalaJSIRSourcesJar)).toSeq
707720
}.taskValue,

0 commit comments

Comments
 (0)