Skip to content

Use eh2_* namespace from renamed erlang_h2 (companion to erlang_h2#19, refs #893)#894

Open
walki wants to merge 1 commit into
benoitc:masterfrom
walki:use-eh2-namespace
Open

Use eh2_* namespace from renamed erlang_h2 (companion to erlang_h2#19, refs #893)#894
walki wants to merge 1 commit into
benoitc:masterfrom
walki:use-eh2-namespace

Conversation

@walki

@walki walki commented Jun 29, 2026

Copy link
Copy Markdown

Use the eh2_* namespace from renamed erlang_h2

Companion to benoitc/erlang_h2#19; part of fixing #893.

Why

hackney 4.x bundles erlang_h2, whose h2_* module names collide with chatterbox (pulled via grpcboxopentelemetry_exporter). Because BEAM module names are global atoms, any app depending on both hackney 4.x and opentelemetry_exporter can't assemble a release:

** (Mix) Duplicated modules:
    h2_settings / h2_frame / h2_connection / h2_client specified in chatterbox and h2

erlang_h2#19 renames those modules to the eh2_* namespace. This is the matching hackney-side update.

Change

hackney references erlang_h2 only through the connection module, so this is small:

  • h2_connectioneh2_connection (27 call sites in hackney_conn.erl and hackney_h2_stream.erl).

The public h2 API module, the {h2, Conn, ...} message tag, the OTP app name h2, and the dialyzer plt_extra_apps entry are all unchanged.

Dependency note

This branch temporarily points the h2 dep at the rename branch so it builds and can be verified end-to-end:

{h2, {git, "https://github.com/walki/erlang_h2.git", {branch, "fix-h2-module-namespace-collision"}}}

Once erlang_h2#19 is merged and released, this should go back to the hex version ({h2, "~> <renamed release>"}). Happy to update once you cut that release.

Verification

Built end-to-end against a real downstream app (Phoenix + opentelemetry_exporter + ex_aws on hackney): rebar3 compile clean, and the consuming app's mix release now assembles with no duplicated-modules error.

webtransport also references the renamed modules (h2_varint, h2_capsule) and would need the same one-line-namespace update; flagged in erlang_h2#19. Glad to send that PR too.

erlang_h2's h2_* modules were renamed to eh2_* to avoid a module-name clash
with chatterbox (see benoitc#893). hackney
references erlang_h2 only via the connection module, so update those 27 call
sites (h2_connection -> eh2_connection) and point the h2 dep at the renamed
branch.

The public `h2` API module, the `{h2, Conn, ...}` message tag, and the OTP app
name `h2` are unchanged, so nothing else here moves.
@walki walki marked this pull request as ready for review June 29, 2026 16:32
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant