ptrdom commented on code in PR #523:
URL:
https://github.com/apache/pekko-persistence-r2dbc/pull/523#discussion_r4370768982
##########
project/CommonSettings.scala:
##########
@@ -21,8 +21,10 @@ object CommonSettings extends AutoPlugin {
override def requires = JvmPlugin && ApacheSonatypePlugin && DynVerPlugin
override lazy val projectSettings = Seq(
- crossScalaVersions := Seq(Dependencies.Scala213, Dependencies.Scala3,
Dependencies.Scala3Next),
+ crossScalaVersions := Seq(Dependencies.Scala213, Dependencies.Scala3) ++
Dependencies.Scala3TestOnly,
Review Comment:
Agreed, it's a trade-off. Scala Steward finds the Scala versions it updates
by running `sbt "+ stewardDependencies"`
([`SbtAlg.scala`](https://github.com/scala-steward-org/scala-steward/blob/main/modules/core/src/main/scala/org/scalasteward/core/buildtool/sbt/SbtAlg.scala)),
so only versions listed in `crossScalaVersions` get bumped. That's how #485
moved `Scala3Next` from 3.8.4 to 3.9.0. If 3.9 and 3.10 leave the list, they'd
need manual bumps, so I'd rather keep them and accept that a Scala Next break
shows up in the Binary Compatibility job.
##########
project/CommonSettings.scala:
##########
@@ -21,8 +21,10 @@ object CommonSettings extends AutoPlugin {
override def requires = JvmPlugin && ApacheSonatypePlugin && DynVerPlugin
override lazy val projectSettings = Seq(
- crossScalaVersions := Seq(Dependencies.Scala213, Dependencies.Scala3,
Dependencies.Scala3Next),
+ crossScalaVersions := Seq(Dependencies.Scala213, Dependencies.Scala3) ++
Dependencies.Scala3TestOnly,
scalaVersion := Dependencies.Scala213,
+ // all Scala 3 versions share the _3 suffix, so only the Scala3 build may
be published
+ publish / skip := (publish / skip).value ||
Dependencies.Scala3TestOnly.contains(scalaVersion.value),
Review Comment:
Same reason as above: keeping them in `crossScalaVersions` keeps Steward
updating them. With that, `publish / skip` and the MiMa exclusion are what keep
the published artifacts on 2.13 and 3.3. `publishSigned` respects `publish /
skip` too (sbt-pgp `PgpSettings`), so releases are covered.
##########
.github/workflows/build-test.yml:
##########
@@ -8,12 +8,34 @@ on:
tags-ignore: [ v.* ]
jobs:
+ scala-versions:
+ name: Read Scala versions
+ runs-on: ubuntu-latest
+ outputs:
+ versions: ${{ steps.versions.outputs.versions }}
+ steps:
+ - name: Checkout
+ uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 #
v7.0.1
+
+ # every `val Scala... = "x.y.z"` in Dependencies.scala becomes a matrix
entry
+ - name: Read Scala versions from project/Dependencies.scala
+ id: versions
+ run: |-
+ versions=$(sed -n 's/^ *val Scala[0-9A-Za-z]* = "\([^"]*\)".*/\1/p'
project/Dependencies.scala | jq -R . | jq -cs .)
Review Comment:
Good point, changed in c4cd10c. The matrix is now `[ scala213, scala3,
scala3Lts, scala3Next ]`, using sbt command aliases defined in `build.sbt` from
the named `Dependencies.scala` values. Only those four values are used, the
extra job is gone, and CI still follows Steward bumps.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]