Skip to content

Commit 003dd84

Browse files
committed
Revert upgrading sbt plugins to workaround scala/scala3#22890 - was leading to multiple more new issues
1 parent 2075872 commit 003dd84

File tree

2 files changed

+1
-82
lines changed

2 files changed

+1
-82
lines changed

coordinator/configs/projects-config.conf

+1-30
Original file line numberDiff line numberDiff line change
@@ -306,16 +306,6 @@ danslapman_morphling{
306306
projects.exclude = [morphling-circe] // Needs update due to source compatible change
307307
}
308308
dapperware_dappermongo.tests = compile-only // test containers
309-
davenverse_epimetheus-community {
310-
source-patches = [{
311-
path = "build.sbt"
312-
pattern = """ThisBuild / mergifyStewardConfig ~= {
313-
_.map(_.copy(mergeMinors = true, author = "davenverse-steward[bot]"))
314-
}
315-
"""
316-
replace-with = ""
317-
}]
318-
}
319309
davenverse_fuuid {
320310
sbt.commands = [
321311
// Disable intergration tests using test containers
@@ -392,17 +382,7 @@ durban_choam{
392382
pattern = "MapHelper.ttrie[Int, String](h)"
393383
replace-with = "MapHelper.ttrie[Int, String](using h)"
394384
}]
395-
}
396-
dwolla_fs2-aws {
397-
source-patches = [{
398-
path = "build.sbt"
399-
pattern = """ThisBuild / mergifyStewardConfig ~= { _.map(_.copy(
400-
author = "dwolla-oss-scala-steward[bot]",
401-
mergeMinors = true,
402-
))}"""
403-
replace-with = ""
404-
}]
405-
}
385+
}
406386
earogov_ordset{
407387
source-patches = [{
408388
path = "build.sc"
@@ -1551,15 +1531,6 @@ typelevel_laika {
15511531
}
15521532
]
15531533
}
1554-
typelevel_log4cats-natchez{
1555-
source-patches = [{
1556-
path = "build.sbt"
1557-
pattern = """ThisBuild / mergifyStewardConfig ~= {
1558-
_.map(_.copy(mergeMinors = true, author = "typelevel-steward[bot]", action = MergifyAction.Merge(method = Option("squash"))))
1559-
}"""
1560-
replace-with = ""
1561-
}]
1562-
}
15631534
typelevel_otel4s.tests = compile-only
15641535
typelevel_otel4s-experimental.source-patches = [
15651536
{

coordinator/src/main/scala/ProjectConfigDiscovery.scala

-52
Original file line numberDiff line numberDiff line change
@@ -282,9 +282,6 @@ class ProjectConfigDiscovery(internalProjectConfigsPath: java.io.File, requiredC
282282
case _ => None
283283
}
284284
}
285-
object AddSbtPluginRef:
286-
def unapply(v: String): Option[AddSbtPlugin] = AddSbtPlugin.unapply(v)
287-
288285

289286
commonBuildFiles(projectDir).flatMap { file =>
290287
def patch(pattern: String, replacement: String) = SourcePatch(
@@ -298,59 +295,10 @@ class ProjectConfigDiscovery(internalProjectConfigsPath: java.io.File, requiredC
298295

299296
case line @ s"ThisBuild${_}/${_}tlFatalWarnings${_}:=${_}true" =>
300297
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-
)
337298
}.distinct
338299
}
339300
end discoverSourcePatches
340301

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-
354302
private def tryReadLines(file: os.Path): Seq[String] = {
355303
try os.read.lines(file).toSeq
356304
catch {

0 commit comments

Comments
 (0)