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
Switch off exhaustivity warnings for unsealed types (by default) #9299
Conversation
Replaces `-Xno-unsealed-patmat-analysi` with `-Xlint:strict-unsealed-patmat`, switching the default behaviour to opt-in to this strictness. :( However, at least by being in the Xlint family, it's on if you opt-in to `-Xlint`. Reverts commit 0416c57 (w/ tweaks).
🤔 I'll fold this change into #9140, but perhaps this PR should be a link in the "exhaustivity" section of the release notes. |
|
Sure. We do also have |
Hmmm.... let's leave it as is in this PR. |
to repeat in public some points from our internal discussions: Martin and Guillaume both expressed reservations about making this warn by default, for now anyway, especially since the changes to the pattern matcher are so new so we don't have much experience with them yet. Going forward, we'll want to coordinate with the Scala 3 team about any further changes to defaults (e.g. on https://contributors.scala-lang.org where others can weigh in as well). Making it part of the Note also that over at #7525 @som-snytt is exploring ideas such as perhaps backporting Scala 3's |
In 2.13.4, the pattern match exhaustivity analysis has become stricter. It remains active in the presence of guards and custom extractors (including `unapplySeq`). This change causes some new warnings in our codebase, which this commit addresses. See scala/scala#9140, which was somewhat toned down by scala/scala#9299.
In 2.13.4, the pattern match exhaustivity analysis has become stricter. It remains active in the presence of guards and custom extractors (including `unapplySeq`). This change causes some new warnings in our codebase, which this commit addresses. See scala/scala#9140, which was somewhat toned down by scala/scala#9299.
Could someone trigger an update of https://raw.githubusercontent.com/scala/community-builds/2.13.x/nightly.properties now that this PR has been merged, please? That would allow to restore our nightly-against-nightly build, to make sure we're not hitting something else among the recent changes. |
|
whoops, I got confused — 1284 is about project SHAs, not Scala SHAs. I made a new PR advancing the Scala SHA: scala/community-build#1286 |
Replaces
-Xno-unsealed-patmat-analysis
with-Xlint:strict-unsealed-patmat
, so that you must opt-in if you want this strictness.:(
However, at least by being in the Xlint family, it's on if you opt-in to
-Xlint
.Reverts commit 0416c57 (w/ tweaks).