Skip to content

Conversation

@michaelklishin
Copy link
Collaborator

@michaelklishin michaelklishin commented Nov 6, 2025

HEX_TARBALL_FILES included ../../rabbitmq-components.mk which modern rebar3 compile considers to be unsafe and fails on (quite reasonably).

FTR, the error looks like this:

===> Fetching rebar_alias v0.2.0
===> Analyzing applications...
===> Compiling rebar_alias
===> Verifying dependencies...
===> Fetching amqp_client v4.1.5
escript: exception error: no function clause matching
                 rebar_fetch:format_error({error,
                                           {hex_tarball,
                                            {inner_tarball,
                                             {"../../rabbitmq-components.mk",
                                              unsafe_path}}}}) (/home/runner/work/rebar3/rebar3/apps/rebar/src/rebar_fetch.erl, line 99)
  in function  rebar3:handle_error/2 (/home/runner/work/rebar3/rebar3/apps/rebar/src/rebar3.erl, line 383)
  in call from escript:run/2 (escript.erl, line 904)
  in call from escript:start/1 (escript.erl, line 418)
  in call from init:start_it/1
  in call from init:start_em/1
  in call from init:do_boot/3

Excluding this relative path addresses the issue.

rabbit_common/Makefile arguably does not need to
add any .mk files to the tarball but let's
deal with that in a separate change.

HEX_TARBALL_FILES included ../../rabbitmq-components.mk which
modern `rebar3 compile` considers to be unsafe and fails on
(quite reasonably).

FTR, the error looks like this:

````
===> Fetching rebar_alias v0.2.0
===> Analyzing applications...
===> Compiling rebar_alias
===> Verifying dependencies...
===> Fetching amqp_client v4.1.5
escript: exception error: no function clause matching
                 rebar_fetch:format_error({error,
                                           {hex_tarball,
                                            {inner_tarball,
                                             {"../../rabbitmq-components.mk",
                                              unsafe_path}}}}) (/home/runner/work/rebar3/rebar3/apps/rebar/src/rebar_fetch.erl, line 99)
  in function  rebar3:handle_error/2 (/home/runner/work/rebar3/rebar3/apps/rebar/src/rebar3.erl, line 383)
  in call from escript:run/2 (escript.erl, line 904)
  in call from escript:start/1 (escript.erl, line 418)
  in call from init:start_it/1
  in call from init:start_em/1
  in call from init:do_boot/3
```

Excluding this relative path addresses the issue.

rabbit_common/Makefile arguably does not need to
add any .mk files to the tarball but let's
deal with that in a separate change.
Copy link

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull Request Overview

This PR removes the rabbitmq-components.mk file from the Hex.pm tarball configuration across multiple RabbitMQ dependency packages.

  • Excludes ../../rabbitmq-components.mk from HEX_TARBALL_FILES in four Makefiles
  • Ensures only package-specific files (like git-revisions.txt and mk files) are included in Hex.pm tarballs
  • The build infrastructure file from the parent directory is still included for build purposes

Reviewed Changes

Copilot reviewed 4 out of 4 changed files in this pull request and generated no comments.

File Description
deps/rabbit_common/Makefile Removes ../../rabbitmq-components.mk from HEX_TARBALL_FILES, retaining only git-revisions.txt and mk/ directory files
deps/amqp_client/Makefile Removes ../../rabbitmq-components.mk from HEX_TARBALL_FILES, leaving only git-revisions.txt
deps/amqp10_common/Makefile Removes ../../rabbitmq-components.mk from HEX_TARBALL_FILES, leaving only git-revisions.txt
deps/amqp10_client/Makefile Removes ../../rabbitmq-components.mk from HEX_TARBALL_FILES, leaving only git-revisions.txt

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

@michaelklishin michaelklishin changed the title Fix rabbit_common, amqp_client, amqp10_client publishing to hex.pm Build system: fix rabbit_common, amqp_client, amqp10_client publishing to hex.pm Nov 6, 2025
@michaelklishin michaelklishin added this to the 4.3.0 milestone Nov 6, 2025
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.

2 participants