Current section
4 Versions
Jump to
Current section
4 Versions
Compare versions
5
files changed
+35
additions
-12
deletions
| @@ -1 +1 @@ | |
| 1 | - 0.2.0 |
| 1 | + 0.2.1 |
| \ No newline at end of file |
| @@ -4,6 +4,14 @@ Completed roadmap tasks. For upcoming work, see [ROADMAP.md](ROADMAP.md). | |
| 4 4 | |
| 5 5 | --- |
| 6 6 | |
| 7 | + ## [0.2.1] - 2026-06-08 |
| 8 | + |
| 9 | + ### Fixed |
| 10 | + - Encoding no longer crashes when dialyxir's `format_short/1` throws on exotic type tokens (e.g. an Ash 3.27 / OTP 29 unknown-type warning for `'Elixir.Ash.Resource':record/0`, where Erlex's lexer throws on the token). Such warnings now degrade gracefully to the raw dialyzer message instead of aborting the whole encode. |
| 11 | + |
| 12 | + ### Changed |
| 13 | + - Updated and pinned dev/test dependencies (bandit, credo, doctor, ex_doc, ex_unit_json, jason) |
| 14 | + |
| 7 15 | ## [0.2.0] - 2026-03-21 |
| 8 16 | |
| 9 17 | ### Added |
| @@ -1,6 +1,6 @@ | |
| 1 1 | {<<"links">>,[{<<"GitHub">>,<<"https://github.com/ZenHive/dialyzer_json">>}]}. |
| 2 2 | {<<"name">>,<<"dialyzer_json">>}. |
| 3 | - {<<"version">>,<<"0.2.0">>}. |
| 3 | + {<<"version">>,<<"0.2.1">>}. |
| 4 4 | {<<"description">>, |
| 5 5 | <<"AI-friendly JSON output for Dialyzer warnings. Structured output for Claude Code and similar AI editors.">>}. |
| 6 6 | {<<"elixir">>,<<"~> 1.19">>}. |
| @@ -110,10 +110,22 @@ defmodule DialyzerJson.WarningEncoder do | |
| 110 110 | defp format_message(warning_type, args) do |
| 111 111 | case get_dialyxir_warning_module(warning_type) do |
| 112 112 | nil -> format_raw_message(warning_type, args) |
| 113 | - module -> module.format_short(args) |
| 113 | + module -> safe_format_short(module, warning_type, args) |
| 114 114 | end |
| 115 115 | end |
| 116 116 | |
| 117 | + @doc false |
| 118 | + # dialyxir's format_short/1 lexes type tokens through Erlex, which THROWS on |
| 119 | + # exotic tokens (e.g. an unknown-type warning for `'Elixir.Ash.Resource':record/0` |
| 120 | + # on Ash 3.27 / OTP 29). An uncaught throw here killed the whole encode. Degrade |
| 121 | + # to the raw dialyzer message instead — same safety net format_raw_message/2 gives. |
| 122 | + @spec safe_format_short(module(), atom(), list()) :: String.t() |
| 123 | + defp safe_format_short(module, warning_type, args) do |
| 124 | + module.format_short(args) |
| 125 | + catch |
| 126 | + _kind, _reason -> format_raw_message(warning_type, args) |
| 127 | + end |
| 128 | + |
| 117 129 | @doc false |
| 118 130 | # Formats the raw message using dialyzer's built-in formatting. |
| 119 131 | # Falls back to inspect-based format if dialyzer can't format the warning. |
| @@ -50,9 +50,9 @@ defmodule DialyzerJson.MixProject do | |
| 50 50 | |
| 51 51 | defp aliases do |
| 52 52 | [ |
| 53 | - # Port 4002 to avoid conflict with consumer projects on 4001 |
| 53 | + # Port 4022 — registry-assigned (~/.claude/tidewave-ports.md); 4002 collided with ccxt_extract |
| 54 54 | tidewave: [ |
| 55 | - "run --no-halt -e 'Agent.start(fn -> Bandit.start_link(plug: Tidewave, port: 4002) end)'" |
| 55 | + "run --no-halt -e 'Agent.start(fn -> Bandit.start_link(plug: Tidewave, port: 4022) end)'" |
| 56 56 | ] |
| 57 57 | ] |
| 58 58 | end |
| @@ -63,13 +63,16 @@ defmodule DialyzerJson.MixProject do | |
| 63 63 | {:dialyxir, "~> 1.4", only: [:dev, :test], runtime: false}, |
| 64 64 | {:jason, "~> 1.4"}, |
| 65 65 | {:credo, "~> 1.7", only: [:dev, :test], runtime: false}, |
| 66 | - {:sobelow, "~> 0.13", only: [:dev, :test], runtime: false}, |
| 67 | - {:doctor, "~> 0.21", only: [:dev, :test], runtime: false}, |
| 68 | - {:styler, "~> 1.0", only: [:dev, :test], runtime: false}, |
| 69 | - {:ex_unit_json, "~> 0.3", only: [:dev, :test], runtime: false}, |
| 70 | - {:ex_doc, "~> 0.35", only: :dev, runtime: false}, |
| 71 | - {:tidewave, "~> 0.1", only: :dev}, |
| 72 | - {:bandit, "~> 1.0", only: :dev} |
| 66 | + {:sobelow, "~> 0.14", only: [:dev, :test], runtime: false}, |
| 67 | + {:doctor, "~> 0.23", only: [:dev, :test], runtime: false}, |
| 68 | + {:styler, "~> 1.11", only: [:dev, :test], runtime: false}, |
| 69 | + {:ex_unit_json, "~> 0.5", only: [:dev, :test], runtime: false}, |
| 70 | + {:reach, "~> 2.7", only: [:dev, :test], runtime: false}, |
| 71 | + {:ex_ast, "~> 0.12.0", only: [:dev, :test], runtime: false}, |
| 72 | + {:boxart, "~> 0.3.3", only: [:dev, :test], runtime: false}, |
| 73 | + {:ex_doc, "~> 0.40", only: :dev, runtime: false}, |
| 74 | + {:tidewave, "~> 0.5", only: :dev}, |
| 75 | + {:bandit, "~> 1.12", only: :dev} |
| 73 76 | ] |
| 74 77 | end |
| 75 78 | end |