Use eh2_* namespace from renamed erlang_h2 (companion to erlang_h2#19, refs #893)#894
Open
walki wants to merge 1 commit into
Open
Use eh2_* namespace from renamed erlang_h2 (companion to erlang_h2#19, refs #893)#894walki wants to merge 1 commit into
walki wants to merge 1 commit into
Conversation
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.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Use the
eh2_*namespace from renamed erlang_h2Companion to benoitc/erlang_h2#19; part of fixing #893.
Why
hackney 4.x bundles
erlang_h2, whoseh2_*module names collide withchatterbox(pulled viagrpcbox←opentelemetry_exporter). Because BEAM module names are global atoms, any app depending on both hackney 4.x andopentelemetry_exportercan't assemble a release: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_connection→eh2_connection(27 call sites inhackney_conn.erlandhackney_h2_stream.erl).The public
h2API module, the{h2, Conn, ...}message tag, the OTP app nameh2, and the dialyzerplt_extra_appsentry are all unchanged.Dependency note
This branch temporarily points the
h2dep 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 compileclean, and the consuming app'smix releasenow assembles with no duplicated-modules error.webtransportalso 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.