Skip to content

Switch CLI tools to Thoas for JSON serializer; re-enable Dialyzer for 4 plugins#15964

Merged
michaelklishin merged 2 commits intomainfrom
mk-double-elixir-dep-on-elixir-1.19
Apr 8, 2026
Merged

Switch CLI tools to Thoas for JSON serializer; re-enable Dialyzer for 4 plugins#15964
michaelklishin merged 2 commits intomainfrom
mk-double-elixir-dep-on-elixir-1.19

Conversation

@michaelklishin
Copy link
Copy Markdown
Collaborator

@michaelklishin michaelklishin commented Apr 8, 2026

Elixir 1.18+ introduces a standard library JSON module which conflicts with the json library we've been using in CLI tools for --formatter=json and such.

Since the two Elixir versions are not compatible
and we have reasons to not bump Elixir too aggressively just yet, the most pragmatic option was to switch CLI tools to use thoas, the Erlang JSON
parser RabbitMQ core and HTTP API use.

This unblocks Dialyzer runs in four plugins disabled about 10 months ago and reveals a rabbitmq_mqtt Dialyzer failure due to a field that was removed
from a record but not its type spec.

The plugins in question added CLI tools to their PLT_APPS.

Due to the MQTT plugin issue above, this can only
be backported to v4.3.x, a v4.2.x version
will need some tweaks.

@mergify mergify Bot added the make label Apr 8, 2026
@michaelklishin michaelklishin changed the title Switch CLI tools to an Erlang JSON module; re-enable Dialyzer for 4 plugins Switch CLI tools to Thoas for JSON serializer; re-enable Dialyzer for 4 plugins Apr 8, 2026
…lugins

Elixir 1.18+ introduces a standard library JSON module
which conflicts with the `json` library we've been using
in CLI tools for `--formatter=json` and such.

Since the two Elixir versions are not compatible
and we have reasons to not bump Elixir too aggressively
just yet, the most pragmatic option was to
switch CLI tools to use `thoas`, the Erlang JSON
parser RabbitMQ core and HTTP API use.

This unblocks Dialyzer runs in four plugins disabled
about 10 months ago and reveals a `rabbitmq_mqtt`
Dialyzer failure due to a field that was removed
from a record but not its type spec.

Due to the MQTT plugin issue above, this can only
be backported to `v4.3.x`, a `v4.2.x` version
will need some tweaks.
at least as closely as practical for RabbitMQ's
needs.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant