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

   ### Motivation
   Issue #265 tracks re-enabling the `strict-unsealed-patmat` lint that was 
disabled globally in #264 to unblock the build. This lint catches pattern 
matches on non-sealed traits that may not be exhaustive, a class of bugs that 
should be caught at compile time.
   
   ### Modification
   Remove the `-Xlint:-strict-unsealed-patmat` silencing flag from 
`PekkoDisciplinePlugin` for Scala 2.13 and fix all resulting exhaustiveness 
warnings across the codebase:
   
   - **Seal traits** where all subtypes are defined in the same file (test/doc 
specs, bench-jmh)
   - **Add `@nowarn` annotations** where traits are intentionally non-sealed 
for cross-file protocols (tutorials 4 & 5: `DeviceGroup.Command`, 
`DeviceGroupQuery.Command`)
   - **Add catch-all cases** for matches on `OptionVal` and other 
extractor-only types (`Collections`, `UnfoldResourceSourceAsync`, 
`DropRepeated`, `GroupedAdjacentByWeighted`, `Switch`)
   - **Add catch-all cases** for matches on non-sealed final classes with 
custom `unapply` (`ShardRegionStats`, `CurrentShardRegionState`, 
`AllDeadLetters`)
   
   20 files changed across actor, stream, docs, test, and bench-jmh modules.
   
   ### Result
   The `strict-unsealed-patmat` lint is now active for Scala 2.13, catching 
future pattern match exhaustiveness issues at compile time. No behavioral 
changes to production code — all catch-all cases are unreachable and marked as 
such.
   
   ### Tests
   `sbt "docs / Test / compile"` — success, no exhaustiveness errors
   
   ### References
   Fixes #265


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