Support -Wunused:patvars on Scala 3#255
Merged
lenguyenthanh merged 2 commits intoMay 16, 2026
Merged
Conversation
The safe `-Wunused:patvars` was forward-ported from Scala 2 in 3.7.0 (scala/scala3#20894) and backported to the 3.3 LTS in 3.3.7 (scala/scala3-lts#223). Earlier 3.x only offered the unsafe variant `-Wunused:unsafe-warn-patvars`, which is not exposed by this library. Verified empirically with scala-cli: rejected on 3.3.6 and 3.6.4, accepted on 3.3.7 and 3.7.0. Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
Member
Author
|
@lenguyenthanh 🙏 I'll follow up with an sbt-tpolecat PR, unless you want a draft before this is merged |
lenguyenthanh
approved these changes
May 16, 2026
Member
lenguyenthanh
left a comment
There was a problem hiding this comment.
thanks! the release note isn't clear about this change at all. I bet a lot of people miss this.
Member
Author
at least it's automatically available in |
Member
Author
|
@lenguyenthanh can you make a release? btw. happy to help with some routine maintenance stuff |
Member
yeah, I'll make one now
thanks a lot, and hey @armanbilge, we have a volunteer 😄 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
-Wunused:patvarson Scala 3 versions where the safe variant is available-Wunused:unsafe-warn-patvars, which this library does not expose-Wunused:patvarswas forward-ported from Scala 2 in 3.7.0 (scala/scala3#20894) and backported to the 3.3 LTS in 3.3.7 (scala/scala3-lts#223)The resulting gating is
[2.13.0, 3.0.0) ∪ [3.3.7, 3.4.0) ∪ [3.7.0, ∞).Note: the LTS PR description claims it was backported "to the 3.3.6", but that PR did not actually ship in 3.3.6 — it landed in 3.3.7 (confirmed in the 3.3.7 release notes which list #20894 under "Highlights").
Test plan
scala-cli:-Wunused:patvarsis rejected on 3.3.6 and 3.6.4, accepted on 3.3.7 and 3.7.0sbt libJVM/testpasses (26/26)🤖 Generated with Claude Code