@@ -124,8 +124,8 @@ object Build {
124124 * scala-library.
125125 */
126126 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 "
129129 }
130130
131131 val dottyOrganization = " org.scala-lang"
@@ -1002,7 +1002,21 @@ object Build {
10021002 IO .createDirectory(trgDir)
10031003 IO .unzip(scalaLibrarySourcesJar, trgDir)
10041004
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
10061020 } (Set (scalaLibrarySourcesJar)).toSeq
10071021 }.taskValue,
10081022 (Compile / sourceGenerators) += Def .task {
@@ -1141,7 +1155,7 @@ object Build {
11411155 .exclude(" org.eclipse.lsp4j" ," org.eclipse.lsp4j.jsonrpc" ),
11421156 " org.eclipse.lsp4j" % " org.eclipse.lsp4j" % " 0.20.1" ,
11431157 ),
1144- libraryDependencies += (" org.scalameta" % " mtags-shared_2.13.12 " % mtagsVersion % SourceDeps ),
1158+ libraryDependencies += (" org.scalameta" % " mtags-shared_2.13.14 " % mtagsVersion % SourceDeps ),
11451159 ivyConfigurations += SourceDeps .hide,
11461160 transitiveClassifiers := Seq (" sources" ),
11471161 Compile / scalacOptions ++= Seq (" -Yexplicit-nulls" , " -Ysafe-init" ),
@@ -1694,6 +1708,8 @@ object Build {
16941708 " -Dplugin.version=" + version.value,
16951709 " -Dplugin.scalaVersion=" + dottyVersion,
16961710 " -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" ,
16971713 " -Dplugin.scalaJSVersion=" + scalaJSVersion,
16981714 " -Dsbt.boot.directory=" + ((ThisBuild / baseDirectory).value / " .sbt-scripted" ).getAbsolutePath // Workaround sbt/sbt#3469
16991715 ),
0 commit comments