He-Pin opened a new pull request, #531:
URL: https://github.com/apache/pekko-persistence-jdbc/pull/531

   ### Motivation
   Several compiler warnings were emitted during compilation of the core module 
and sbt build loading:
   - `JdbcAsyncWriteJournal.scala:115` - "a type was inferred to be `Any`; this 
may indicate a programming error"
   - `legacy/package.scala:20` - "it is not recommended to define 
classes/objects inside of package objects"
   - `JdbcDurableStateStore.scala:247` - "private method updateDurableState is 
never used"
   - `TrySeq.scala:23` - "match may not be exhaustive"
   - `build.sbt:92` - sbt lint warning about unused key `previewPath`
   
   ### Modification
   - **JdbcAsyncWriteJournal**: add `.map(_ => ())` before `.recover` to 
explicitly convert `Future[?]` to `Future[Unit]`, avoiding the `Any` type 
inference when the wildcard-typed future is recovered.
   - **legacy/package.scala**: add `@nowarn("msg=it is not recommended to 
define classes/objects inside of package objects")` on `JournalRow`. This is a 
known Scala pattern and safe to suppress.
   - **JdbcDurableStateStore**: remove unused private `updateDurableState` 
method. The `upsertObject` method already calls 
`queries.updateDbWithDurableState` directly, making the wrapper dead code.
   - **TrySeq**: add `@nowarn("msg=match may not be exhaustive")` on the 
`recurse` method. The match is exhaustive in practice since `Try` is sealed 
(only `Success` and `Failure`), but the compiler cannot prove this with `Seq` 
pattern decomposition.
   - **build.sbt**: add `Global / excludeLintKeys += previewPath` to suppress 
the sbt lint warning. The key is set for the Paradox site plugin and 
intentionally kept.
   
   ### Result
   Clean compilation with zero warnings from both the Scala compiler and sbt 
lint checks.
   
   ### Tests
   - `sbt "clean; compile"` passes with no warnings
   
   ### References
   None - compiler warning cleanup


-- 
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]

Reply via email to