Add OTP 28 Dialyzer warning support (exact_compare, opaque_compare, opaque_union)#591
Open
bawolf wants to merge 3 commits intojeremyjh:masterfrom
Open
Add OTP 28 Dialyzer warning support (exact_compare, opaque_compare, opaque_union)#591bawolf wants to merge 3 commits intojeremyjh:masterfrom
bawolf wants to merge 3 commits intojeremyjh:masterfrom
Conversation
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
OTP 28's Dialyzer 5.4 reworked opaque type checking as part of EEP-69: Nominal Types, which renamed and replaced several warning atoms. Without handling them, dialyxir prints "Unknown warning" and falls through to legacy formatting, bypassing the ignore file.
This PR adds three new warning modules to match the OTP 28 changes:
exact_compare(replacesexact_eq) — comparison that can never evaluate to the expected value. Dynamically reports'true'or'false'based on the operator (==/=:=vs/=/=/=).opaque_compare(replacesopaque_eq+ absorbsopaque_neq) — equality/inequality test involving an opaque type.opaque_union(new) — function body yields a type whose opacity is broken by other clauses. This is the only new warning explicitly documented in the release notes; it has a corresponding-Wno_opaque_unionsuppression flag in Dialyzer.The existing OTP 26/27 modules (
ExactEquality,OpaqueEquality,OpaqueNonequality) are preserved for backward compatibility.Also adds OTP 28.0 to the CI matrix.
Fixes #562