The GitHub Actions job "Scalafmt" on pekko.git/scala3-fix-scala38-compat has failed. Run started by GitHub user He-Pin (triggered by He-Pin).
Head commit for run: 92f6e7376cec84291df37c4cb27ae931be3e65dc / 虎鸣 <[email protected]> feat: Fix Scala 3.8.4 compilation compatibility while preserving 2.13 and 3.3.x cross-build Motivation: The codebase needs to compile with both Scala 3.3.x (current production) and Scala 3.8.4 (forward compatibility for the upcoming 3.9 LTS). Several patterns in the codebase break under Scala 3.8 due to changes in how context bounds are desugared (they become `using` clauses), stricter deprecation warnings, and syntax changes. Modification: - ClassTag context bound fixes: In Scala 3.8, `[T: ClassTag]` desugars to a `using` clause, making explicit `ClassTag` passing positional-incompatible. Fixed by using `implicit val ct: ClassTag[T] = ClassTag(clazz)` in scope and relying on implicit resolution instead of explicit passing. - PersistencePlugin implicit parameter merge: Merged `[T: ClassTag]` context bound and `(implicit ev: PluginProvider[...])` into a single `implicit` parameter list to avoid context bound + separate implicit parameter mismatch. - `.apply()` trick: Used `decoration[T].apply(behavior)` instead of `decoration[T](behavior)` to separate implicit resolution from function application. - `private[this]` to `private`: Scala 3.8 deprecates `private[this]` in favor of `private`. - `= _` initializers to explicit defaults: Replaced `= _` with `= null`, `= None`, `= 0`, etc. as Scala 3.8 deprecates uninitialized vars. - `SortedSet.empty(ordering)` fix: Bound ordering as `implicit val ord` before calling `.empty[Member]` to avoid implicit resolution issues. - `@unchecked` annotations: Added for type-test patterns that can't be checked at runtime under Scala 3. - `@nowarn` filters: Used message-based `@nowarn("msg=never used")` instead of category-based filters for cross-version compatibility. - `PekkoDisciplinePlugin.scala`: Added `-Wconf` suppression rules for Scala 3.8 deprecation/syntax warnings in both main and test scopes. - No `using` keyword in shared sources: All changes use cross-compatible patterns (`implicit val`, `.apply()` trick). Result: All modules compile with both Scala 2.13.18 and Scala 3.8.4. Production Scala 3 version remains at 3.3.8 — this change only ensures forward compatibility. No behavioral changes to the runtime. Tests: - sbt "++3.8.4" "Test / compile" — success across all modules - sbt "Test / compile" (Scala 2.13.18) — success across all modules References: None - proactive Scala 3.8 forward compatibility Report URL: https://github.com/apache/pekko/actions/runs/27497655798 With regards, GitHub Actions via GitBox --------------------------------------------------------------------- To unsubscribe, e-mail: [email protected] For additional commands, e-mail: [email protected]
