-
Notifications
You must be signed in to change notification settings - Fork 4k
Build system: fix rabbit_common, amqp_client, amqp10_client publishing to hex.pm #14915
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Build system: fix rabbit_common, amqp_client, amqp10_client publishing to hex.pm #14915
Conversation
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.
There was a problem hiding this 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.mkfromHEX_TARBALL_FILESin four Makefiles - Ensures only package-specific files (like
git-revisions.txtand 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.
|
The rabbitmq-components.mk file is required to make sure developers of plugins use the same dependencies as RabbitMQ. I understand why we can’t include a file from a parent directly, but I don’t get why the tarball seems incorrectly created. I will need to look at what is created. |
|
@michaelklishin when I run The only way I've found to workaround that error is to run the following commands prior: That can't possibly be right eh? Anyway, when I work around that issue, and create the tarball, here are the contents: @dumbbell what happens is that Since compiling RabbitMQ on Windows isn't really supported, maybe the symlinks should be restored. Or, I'm just about to investigate a change here that would strip all leading UPDATE: |
|
@michaelklishin I created this project to see what would happen if I included the latest In the There's also a simple It's the latest version - maybe this handles leading |
HEX_TARBALL_FILESincluded ../../rabbitmq-components.mk which modernrebar3 compileconsiders to be unsafe and fails on (quite reasonably).FTR, the error looks like this:
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.