@@ -124,8 +124,8 @@ object Build {
124
124
* scala-library.
125
125
*/
126
126
def stdlibVersion (implicit mode : Mode ): String = mode match {
127
- case NonBootstrapped => " 2.13.12 "
128
- case Bootstrapped => " 2.13.12 "
127
+ case NonBootstrapped => " 2.13.14 "
128
+ case Bootstrapped => " 2.13.14 "
129
129
}
130
130
131
131
val dottyOrganization = " org.scala-lang"
@@ -1002,7 +1002,21 @@ object Build {
1002
1002
IO .createDirectory(trgDir)
1003
1003
IO .unzip(scalaLibrarySourcesJar, trgDir)
1004
1004
1005
- ((trgDir ** " *.scala" ) +++ (trgDir ** " *.java" )).get.toSet
1005
+ val (ignoredSources, sources) =
1006
+ ((trgDir ** " *.scala" ) +++ (trgDir ** " *.java" )).get.toSet
1007
+ .partition{file =>
1008
+ // sources from https://github.com/scala/scala/tree/2.13.x/src/library-aux
1009
+ val path = file.getPath.replace('\\ ' , '/' )
1010
+ path.endsWith(" scala-library-src/scala/Any.scala" ) ||
1011
+ path.endsWith(" scala-library-src/scala/AnyVal.scala" ) ||
1012
+ path.endsWith(" scala-library-src/scala/AnyRef.scala" ) ||
1013
+ path.endsWith(" scala-library-src/scala/Nothing.scala" ) ||
1014
+ path.endsWith(" scala-library-src/scala/Null.scala" ) ||
1015
+ path.endsWith(" scala-library-src/scala/Singleton.scala" )
1016
+ }
1017
+ // These sources should be never compiled, filtering them out was not working correctly sometimes
1018
+ ignoredSources.foreach(_.delete())
1019
+ sources
1006
1020
} (Set (scalaLibrarySourcesJar)).toSeq
1007
1021
}.taskValue,
1008
1022
(Compile / sourceGenerators) += Def .task {
@@ -1141,7 +1155,7 @@ object Build {
1141
1155
.exclude(" org.eclipse.lsp4j" ," org.eclipse.lsp4j.jsonrpc" ),
1142
1156
" org.eclipse.lsp4j" % " org.eclipse.lsp4j" % " 0.20.1" ,
1143
1157
),
1144
- libraryDependencies += (" org.scalameta" % " mtags-shared_2.13.12 " % mtagsVersion % SourceDeps ),
1158
+ libraryDependencies += (" org.scalameta" % " mtags-shared_2.13.14 " % mtagsVersion % SourceDeps ),
1145
1159
ivyConfigurations += SourceDeps .hide,
1146
1160
transitiveClassifiers := Seq (" sources" ),
1147
1161
Compile / scalacOptions ++= Seq (" -Yexplicit-nulls" , " -Ysafe-init" ),
@@ -1694,6 +1708,8 @@ object Build {
1694
1708
" -Dplugin.version=" + version.value,
1695
1709
" -Dplugin.scalaVersion=" + dottyVersion,
1696
1710
" -Dplugin.scala2Version=" + stdlibVersion(Bootstrapped ),
1711
+ // The last version of Scala 2 that's cross-published for Scala.js 1.12 (version used by LTS)
1712
+ " -Dplugin.scala2ForJSVersion=2.13.13" ,
1697
1713
" -Dplugin.scalaJSVersion=" + scalaJSVersion,
1698
1714
" -Dsbt.boot.directory=" + ((ThisBuild / baseDirectory).value / " .sbt-scripted" ).getAbsolutePath // Workaround sbt/sbt#3469
1699
1715
),
0 commit comments