Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Feature/workarund compiler plugins #137

Merged
29 changes: 14 additions & 15 deletions cli/scb-cli.scala
Original file line number Diff line number Diff line change
Expand Up @@ -212,17 +212,9 @@ case class ProjectInfo(
end groupByDeps
groupByDeps(allDependencies, Set.empty, Nil)
end buildPlanForDependencies

def effectiveTargets(using config: Config) =
val baseTargets = params.buildTargets
val excluded =
for
case JArray(excluded) <- params.config
.map(parse(_) \ "projects" \ "exclude")
.toSeq
case JString(entry) <- excluded
yield entry
baseTargets.diff(excluded)

// Leave excluding project targets to the build tool internals
def effectiveTargets(using config: Config) = params.buildTargets
}
case class BuildInfo(projects: List[ProjectInfo]):
lazy val projectsByName = projects.map(p => p.projectName -> p).toMap
Expand Down Expand Up @@ -1116,14 +1108,12 @@ class LocalReproducer(using config: Config, build: BuildInfo):
os
.read(sbtBuildProperties)
.linesIterator
.collectFirst { case SbtVersion(version) =>
version
}
.collectFirst { case SbtVersion(version) => version }
// .getOrElse(sys.error("Cannot resolve current sbt version"))
val belowMinimalSbtVersion =
currentSbtVersion.forall {
_.split('.').take(3).map(_.takeWhile(_.isDigit).toInt) match {
case Array(1, minor, patch) => minor <= 5 && patch < 5
case Array(1, minor, patch) => minor < 5 || (minor == 5 && patch < 5)
case _ => false
}
}
Expand All @@ -1150,6 +1140,12 @@ class LocalReproducer(using config: Config, build: BuildInfo):
.foreach(
os.copy.into(_, projectDir / "project", replaceExisting = true)
)
os.proc("bash","-c", s"cd $sbtProjectDir && git submodule sync && git submodule update --init --recursive")
.call(
check = false,
stdout = os.Inherit,
stderr = os.Inherit
).exitCode

override def runBuild(): Unit =
def runSbt(forceScalaVersion: Boolean) =
Expand All @@ -1163,9 +1159,12 @@ class LocalReproducer(using config: Config, build: BuildInfo):
"sbt",
"--no-colors",
"--verbose",
"set commands ++= CommunityBuildPlugin.commands",
s"setCrossScalaVersions $effectiveScalaVersion",
s"++$effectiveScalaVersion$versionSwitchSuffix -v",
"set every credentials := Nil",
"moduleMappings",
"removeScalacOptions -deprecation -feature -Xfatal-warnings -Werror",
sbtConfig.commands,
s"runBuild $effectiveScalaVersion $tq$effectiveConfig$tq ${project.effectiveTargets.mkString(" ")}"
).call(
Expand Down
39 changes: 5 additions & 34 deletions coordinator/configs/filtered-projects.txt
Original file line number Diff line number Diff line change
Expand Up @@ -71,6 +71,9 @@ sciss:span:.*
sciss:swingplus:.*
dmurvihill:courier:.*

## Outdated dependency using version not published for Scala3
e257-fi:dirsuite:.*

## Non linear versioning
### scaladex lists only 1 Scala 3 project zio-resource in version 0.0.1 which is more recent then existing 0.1.12 version with only Scala 2 projects
carlos-verdes:funkode:0.[0-1]\..*
Expand Down Expand Up @@ -100,17 +103,9 @@ beangle:webmvc:.*
## Misconfigured + needs ruby on path
makenowjust-labs:lite:.*

## Needs cmake
pdal:java:.*
ablearthy:tdjson-bind:.*

## Needs python
# in tests com-lihaoyi:fastparse:.*

## Some match issues
scala-js:scala-js-macrotask-executor:.*


## Publishing artifact leads to failurs in downstream projects
### Publishes only pom, no artifacts
msgpack4z:msgpack4z-native:.*
Expand All @@ -122,9 +117,6 @@ lorandszakacs:sprout:0.0.[0-5]
rssh:scala-gopher:.*
wangzaixiang:wjson:.*

# Missing dependencies - requires submodules
scalacenter:scala-debug-adapter:.*

## Outdated version, needs new release
2m:yabai-scala:2.0.[0-1]
caspercommunityio:casper-scala-sdk:1.[0-2].[0-1]
Expand Down Expand Up @@ -192,29 +184,8 @@ zio:zio-aws:.*

# Depends on not published lib with CrossVersion.full
## wartremover
atedeg:mdm:.*
cognitedata:cognite-sdk-scala:.*
cheleb:zio-pravega:.*
guymers:ceesvee:.*
kevin-lee:just-semver:.*
kevin-lee:just-sysprocess:.*
medeia:medeia:.*
tharwaninitin:gcp4zio:.*
tharwaninitin:cron4zio:.*
tharwaninitin:etlflow:.*
xuwei-k:wartremover-scalikejdbc:.*

## better2string
kubukoz:drops:.*
kubukoz:spotify-next:.*
kubukoz:sup:.*
polyvariant:colorize-scala:.*
polyvariant:scodec-java-classfile:.*
polyvariant:treesitter4s:.*

## better-files plugin
e257-fi:dirsuite:.*

# Depends on no longer available pre-release
oleg-py:shironeko:0.2.0-M.*

Expand All @@ -228,13 +199,13 @@ laserdisc-io:fs2-aws:5.0.*
## override opaque type
tabdulradi:mazboot:.*

# Requires JDK incubator/preview features
# Requires JDK incubator/preview features (mill)
markehammons:slinc:.*
softwaremill:ox:.*

# Not a real project
alexarchambault:scalacon-2022-demo:.*
alexarchambault:scalacon2022-demo:.*

# Uses deprecated scala-cli directives
quafadas:scautable:.*

Expand Down
99 changes: 94 additions & 5 deletions coordinator/configs/projects-config.conf
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
47degrees_sbt-energymonitor.tests=compile-only

aaronp_code-template.tests=compile-only # uses sript engine factory to work with repl, breaks in RC releases
ablearthy:tdjson-bind.tests = disabled # cannot build native library
akka_akka {
// Based on Scala3 managed community build
tests = compile-only
Expand Down Expand Up @@ -43,6 +44,12 @@ armanbilge_saslprep.sbt.options = ["-J-Xss2M"]
ashwinbhaskar_sight-scala.sbt.commands = [
"""set root/Test/unmanagedSources/excludeFilter ~= { _ || "IntegrationTest.scala" }"""
]
atedeg_mdm {
sbt.commands = [
"excludeLibraryDependency org.wartremover:wartremover_{scalaVersion}",
"removeScalacOptionsStartingWith -P:wartremover"
]
}
atnos-org_eff {
sbt.commands = [
"""set monixJVM/Test/unmanagedSources ~= (_.filterNot(_.getName == "TaskEffectSpec.scala"))"""
Expand All @@ -63,12 +70,22 @@ bilal-fazlani_circe-json-schema.tests = compile-only // Missing test files at ru
carueda_tscfg.sbt.commands = ["genCode"]
cheleb_zio-pravega {
tests = compile-only // uses Docker
sbt.commands = ["""set pravega/Test/unmanagedSources/excludeFilter ~= {_ || "CreateResourcesExample.scala" }"""] // error in source
sbt.commands = [
"""set pravega/Test/unmanagedSources/excludeFilter ~= {_ || "CreateResourcesExample.scala" }""", // error in source
"excludeLibraryDependency org.wartremover:wartremover_{scalaVersion}",
"removeScalacOptionsStartingWith -P:wartremover"
]
}
clevercloud_pulsar4s.tests = compile-only
clockworkconsulting_peregrin.tests = compile-only
clulab_fatdynet.tests = compile-only
com-lihaoyi_fastparse.tests = compile-only // needs python
cognitedata_cognite-sdk-scala {
tests = compile-only
sbt.commands = [
"excludeLibraryDependency org.wartremover:wartremover_{scalaVersion}",
"removeScalacOptionsStartingWith -P:wartremover"
]
}
com-lihaoyi_requests-scala.tests = compile-only
com-lihaoyi_scalatags.tests = compile-only

Expand Down Expand Up @@ -170,7 +187,13 @@ geirolz_fly4s.tests = compile-only // flaky
geirolz_scope.tests = compile-only
gemini-hlsw_gsp-graphql.tests = compile-only // uses Docker
gonzih_cats-nats.tests = compile-only
guymers_ceesvee.tests = compile-only // flaky
guymers_ceesvee {
sbt.commands = [
"excludeLibraryDependency org.wartremover:wartremover_{scalaVersion}",
"removeScalacOptionsStartingWith -P:wartremover"
]
tests = compile-only // flaky
}
giabao_asm-flow.tests = disabled // Does not compile
giabao_paho-akka.tests = compile-only
giiita_refuel.tests = compile-only
Expand Down Expand Up @@ -258,6 +281,29 @@ j5ik2o_docker-controller-scala.tests = compile-only
katrix_minejson.tests = disabled // Does not compile, build issue
kierendavies_skunk-migrate.tests = compile-only
kirill5k_mongo4cats.tests = compile-only
kevin-lee_just-semver{
projects.exclude = ["io.kevinlee%just-semver"] // aggregate project adding dependency on coreJS
sbt.commands = [
"excludeLibraryDependency org.wartremover:wartremover_{scalaVersion}",
"removeScalacOptionsStartingWith -P:wartremover"
]
}
kevin-lee_just-sysprocess{
sbt.commands = [
"excludeLibraryDependency org.wartremover:wartremover_{scalaVersion} com.olegpy:better-monadic-for_3",
"removeScalacOptionsStartingWith -P:wartremover"
]
}

kubukoz_drops {
sbt.commands = ["excludeLibraryDependency org.polyvariant:better-tostring_{scalaVersion}"]
}
kubukoz_spotify-next {
sbt.commands = ["excludeLibraryDependency org.polyvariant:better-tostring_{scalaVersion}"]
}
kubukoz_sup {
sbt.commands = ["excludeLibraryDependency org.polyvariant:better-tostring_{scalaVersion}"]
}

laserdisc-io_fs2-aws{
tests = compile-only
Expand Down Expand Up @@ -294,6 +340,12 @@ mccarthy_fetch{
# https://github.com/lampepfl/dotty/issues/15843
sbt.commands = ["set awsTextract/Compile/doc/sources := Nil"]
}
medeia_medeia{
sbt.commands = [
"excludeLibraryDependency org.wartremover:wartremover_{scalaVersion}",
"removeScalacOptionsStartingWith -P:wartremover"
]
}
mjakubowski84_parquet4s.java.version = 8
mkroli_dns4s.tests = compile-only
mpollmeier_scala-repl-pp.tests = compile-only
Expand Down Expand Up @@ -345,6 +397,15 @@ polynote_uzhttp {
}
]
}
polyvariant_colorize-scala {
sbt.commands = ["excludeLibraryDependency org.polyvariant:better-tostring_{scalaVersion}"]
}
polyvariant_scodec-java-classfile {
sbt.commands = ["excludeLibraryDependency org.polyvariant:better-tostring_{scalaVersion}"]
}
polyvariant_treesitter4s {
sbt.commands = ["excludeLibraryDependency org.polyvariant:better-tostring_{scalaVersion}"]
}
postgresql-async_postgresql-async.tests = compile-only
pureharm_pureharm-db-core{
projects.exclude = [
Expand Down Expand Up @@ -457,6 +518,10 @@ sirthias_scala-ssh.tests = compile-only
sirthias_parboiled2.tests = compile-only
sksamuel_elastic4s.tests = compile-only
sky-uk_kafka-topic-loader.tests = compile-only // timeouts
softwaremill_ox {
java.version=19
sbt.options = ["-J--enable-preview" "-J--add-modules jdk.incubator.concurrent"]
}
softwaremill_sttp {
sbt {
options=["-J-Xmx5g"]
Expand Down Expand Up @@ -502,7 +567,26 @@ testcontainers_testcontainers-scala{
java.version = 17
tests = compile-only
}
tharwaninitin_etlflow.tests = compile-only
tharwaninitin_etlflow {
sbt.commands = [
"excludeLibraryDependency org.wartremover:wartremover_{scalaVersion}",
"removeScalacOptionsStartingWith -P:wartremover"
]
tests = compile-only
}
tharwaninitin_cron4zio {
sbt.commands = [
"excludeLibraryDependency org.wartremover:wartremover_{scalaVersion}",
"removeScalacOptionsStartingWith -P:wartremover"
]
}
tharwaninitin_gcp4zio {
tests = compile-only
sbt.commands = [
"excludeLibraryDependency org.wartremover:wartremover_{scalaVersion}",
"removeScalacOptionsStartingWith -P:wartremover"
]
}
thoughtworksinc_binding.scala {
// Not a part of the repositroy
projects.exclude=[
Expand Down Expand Up @@ -638,7 +722,12 @@ wartremover_wartremover {
}

xuwei-k_httpz.tests = compile-only

xuwei-k_wartremover-scalikejdbc {
sbt.commands = [
"excludeLibraryDependency org.wartremover:wartremover_{scalaVersion}",
"removeScalacOptionsStartingWith -P:wartremover"
]
}
y-yu_slick-bulk-insert.tests = compile-only

zengularity_benji.tests = compile-only
Expand Down
18 changes: 1 addition & 17 deletions coordinator/configs/replaced-projects.txt
Original file line number Diff line number Diff line change
@@ -1,26 +1,10 @@
scala/scala-swing scala/scala-swing v3.0.0#3.0.0
scala/nanotest-strawman scala/nanotest-strawman main
spray/spray spray/spray-json v1.3.6-3.1.0
typelevel/simulacrum-scalafix typelevel/simulacrum-scalafix master

# https://github.com/lampepfl/dotty/issues/14804
tpolecat/doobie WojciechMazur/doobie fix/3.1.1-compat

# Can be removed after next release:
# Current release 3.1.0
47degrees/fetch 47degrees/fetch main

# 4.15.0
etorreborre/specs2 etorreborre/specs2 main

#1.11.1
Sciss/ScalaInterpreterPane Sciss/ScalaInterpreterPane main

#0.3.1
xuwei-k/applybuilder xuwei-k/applybuilder master

#1.2.9
outr/perfolation outr/perfolation master

#1.0.0
scala/nanotest-strawman scala/nanotest-strawman main
eed3si9n/verify eed3si9n/verify main
1 change: 1 addition & 0 deletions coordinator/configs/slow-projects.txt
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
disneystreaming/smithy4s
scalacenter/scala-debug-adapter
softwaremill/tapir
thoughtworksinc/dsl.scala
Loading