@@ -282,9 +282,6 @@ class ProjectConfigDiscovery(internalProjectConfigsPath: java.io.File, requiredC
282
282
case _ => None
283
283
}
284
284
}
285
- object AddSbtPluginRef :
286
- def unapply (v : String ): Option [AddSbtPlugin ] = AddSbtPlugin .unapply(v)
287
-
288
285
289
286
commonBuildFiles(projectDir).flatMap { file =>
290
287
def patch (pattern : String , replacement : String ) = SourcePatch (
@@ -298,59 +295,10 @@ class ProjectConfigDiscovery(internalProjectConfigsPath: java.io.File, requiredC
298
295
299
296
case line @ s " ThisBuild ${_}/ ${_}tlFatalWarnings ${_}:= ${_}true " =>
300
297
patch(pattern = line, replacement = " " )
301
-
302
- // See https://github.com/scala/scala3/issues/22890
303
- // All of the patches below should eventually be removed once the original issue is fixed
304
- case line @ AddSbtPluginRef (
305
- defn @ AddSbtPlugin (" org.typelevel" , s " sbt-typelevel ${_}" , version)
306
- ) if SemVersion .unapply(version).forall(_ < SemVersion .unsafe(" 0.7.7" )) =>
307
- patch(line, defn.copy(version = " 0.7.7" ).show)
308
-
309
- // Conflicts with org.typelevel:sbt-typelevel-settings
310
- case line @ AddSbtPluginRef (
311
- defn @ AddSbtPlugin (" com.armanbilge" , " sbt-scala-native-config-brew-github-actions" , version)
312
- ) if SemVersion .unapply(version).forall(_ < SemVersion .unsafe(" 0.3.0" )) =>
313
- patch(line, defn.copy(version = " 0.3.0" ).show)
314
- // Same eviction problems
315
- case line @ AddSbtPluginRef (
316
- defn @ AddSbtPlugin (" org.scalablytyped.converter" , " sbt-converter" , version)
317
- ) if SemVersion .unapply(version).forall(_ < SemVersion .unsafe(" 1.0.0-beta44" )) =>
318
- patch(line, defn.copy(version = " 1.0.0-beta44" ).show)
319
-
320
- // Same issue as with sbt-typelevel-settings
321
- case line @ AddSbtPluginRef (
322
- defn @ AddSbtPlugin (" io.circe" , " sbt-circe-org" , version)
323
- ) if SemVersion .unapply(version).forall(_ < SemVersion .unsafe(" 0.4.0" )) =>
324
- patch(line, defn.copy(version = " 0.4.0" ).show)
325
-
326
- case line @ AddSbtPluginRef (
327
- defn @ AddSbtPlugin (" edu.gemini" , " sbt-lucuma-lib" , version)
328
- ) if SemVersion .unapply(version).forall(_ < SemVersion .unsafe(" 0.12.0" )) =>
329
- patch(line, defn.copy(version = " 0.12.0" ).show)
330
-
331
- case s " ${_}libraryDependencies := ${rhs}"
332
- if ! rhs.contains(" libraryDependencies.value" ) =>
333
- patch(
334
- pattern = " libraryDependencies :=" ,
335
- replacement = """ libraryDependencies := Seq("org.scala-lang" % "scala3-library_3" % "<SCALA_VERSION>") ++ """
336
- )
337
298
}.distinct
338
299
}
339
300
end discoverSourcePatches
340
301
341
- case class AddSbtPlugin (org : String , name : String , version : String ) {
342
- def show = s """ addSbtPlugin(" $org" % " $name" % " $version") """
343
- }
344
- object AddSbtPlugin {
345
- def unapply (v : String ): Option [AddSbtPlugin ] = v.trim() match {
346
- case s """ addSbtPlugin(" $org" ${_}% ${_}" $name" ${_}% ${_}" $version") """ =>
347
- Some (AddSbtPlugin (org, name, version))
348
- case s """ addSbtPlugin(" $org" ${_}% ${_}" $name" ${_}% ${_} $version) """ =>
349
- Some (AddSbtPlugin (org, name, version))
350
- case _ => None
351
- }
352
- }
353
-
354
302
private def tryReadLines (file : os.Path ): Seq [String ] = {
355
303
try os.read.lines(file).toSeq
356
304
catch {
0 commit comments