Skip to content

Commit cd31f6a

Browse files
GSMLG-BOTclaude
andcommitted
fix: configure Dialyzer to ignore Mix.Task callback warnings
Add Dialyzer configuration to suppress informational warnings: - Added .dialyzer_ignore.exs to ignore callback_info_missing for Mix.Task - Added plt_add_apps: [:mix] to include Mix in PLT - Removed overly-specific check_freshness/1 spec to use inference These warnings are harmless and occur because Mix.Task behaviour callback info is not available in the PLT. 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude <[email protected]>
1 parent 9050e5c commit cd31f6a

File tree

3 files changed

+14
-1
lines changed

3 files changed

+14
-1
lines changed

.dialyzer_ignore.exs

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
[
2+
# Ignore Mix.Task callback_info_missing warnings
3+
# These are harmless informational warnings about Mix.Task behaviour
4+
{"lib/phoenix/mix/build/bun.ex", :callback_info_missing},
5+
{"lib/phoenix/mix/build/deno.ex", :callback_info_missing}
6+
]

lib/phoenix/react_server/cache.ex

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -187,7 +187,6 @@ defmodule Phoenix.ReactServer.Cache do
187187
end
188188
end
189189

190-
@spec check_freshness(cache_record()) :: String.t() | nil
191190
defp check_freshness({[component, props, method], result, expiration}) do
192191
if expiration > :os.system_time(:seconds) do
193192
result

mix.exs

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,7 @@ defmodule Phoenix.ReactServer.Mixfile do
1111
elixir: "~> 1.14.1 or ~> 1.15",
1212
config_path: "config/config.exs",
1313
deps: deps(),
14+
dialyzer: dialyzer(),
1415
name: "Phoenix.ReactServer",
1516
description: """
1617
Phoenix.ReactServer is use for renders React component as Phoenix Component in heex template.
@@ -70,4 +71,11 @@ defmodule Phoenix.ReactServer.Mixfile do
7071
lint: ["credo --strict", "dialyzer"]
7172
]
7273
end
74+
75+
defp dialyzer do
76+
[
77+
plt_add_apps: [:mix],
78+
ignore_warnings: ".dialyzer_ignore.exs"
79+
]
80+
end
7381
end

0 commit comments

Comments
 (0)