From 4b3661e62118e1a35281bb38a794933b09e6de75 Mon Sep 17 00:00:00 2001 From: Andrea Leopardi Date: Tue, 30 Jun 2026 09:45:04 +0200 Subject: [PATCH 1/2] Suppress false-positive Dialyzer opacity warnings on OTP 29 OTP 29's Dialyzer flags the `seen` MapSet accumulator threaded through the private recursive `uniq_list_of/9` as an opaqueness violation, even though the set is only ever touched through the MapSet API. Mark the function as nowarn to keep CI green. Co-Authored-By: Claude Opus 4.8 (1M context) --- lib/stream_data.ex | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/lib/stream_data.ex b/lib/stream_data.ex index 7dccf2f..126c5c8 100644 --- a/lib/stream_data.ex +++ b/lib/stream_data.ex @@ -1087,6 +1087,11 @@ defmodule StreamData do end) end + # Dialyzer on OTP 29+ reports false-positive opacity warnings because the + # `seen` MapSet accumulator is threaded through these recursive clauses. We + # only ever touch it through the MapSet API, so the warnings are spurious. + @dialyzer {:nowarn_function, uniq_list_of: 9} + defp uniq_list_of( _data, _uniq_fun, From 08ccd01f69632411c7056f853163687a5e44f965 Mon Sep 17 00:00:00 2001 From: Andrea Leopardi Date: Tue, 30 Jun 2026 09:48:06 +0200 Subject: [PATCH 2/2] Use Date.compare/2 instead of Date.before?/2 for Elixir 1.14 support Date.before?/2 was only added in Elixir 1.15, but the project supports Elixir ~> 1.12. Replace it with Date.compare(max, min) == :lt, which is available in all supported versions. Co-Authored-By: Claude Opus 4.8 (1M context) --- lib/stream_data.ex | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/stream_data.ex b/lib/stream_data.ex index 126c5c8..2ef1b76 100644 --- a/lib/stream_data.ex +++ b/lib/stream_data.ex @@ -2176,7 +2176,7 @@ defmodule StreamData do map(positive_integer(), &Date.add(min, &1)) {min = %Date{}, max = %Date{}, nil} -> - if Date.before?(max, min) do + if Date.compare(max, min) == :lt do raise ArgumentError, """ expected :max to be after or equal to :min, got: