Skip to content
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

Latest erlang.mk gets stuck in loop building amqp_client #1014

Closed
jamesaimonetti opened this issue Nov 21, 2024 · 10 comments
Closed

Latest erlang.mk gets stuck in loop building amqp_client #1014

jamesaimonetti opened this issue Nov 21, 2024 · 10 comments

Comments

@jamesaimonetti
Copy link
Contributor

ERLANG_MK_VERSION = 45c5306

When defining dep_amqp_client = hex 3.12.14 as a dep, an infinite loop of processing the rabbit_common dependency occurs.

Reproduction

Makefile:

PROJECT = test
PROJECT_DESCRIPTION = New project
PROJECT_VERSION = 0.1.0

DEPS = amqp_client

dep_amqp_client = hex 3.12.14

include erlang.mk

First run of make:

-*- mode: compilation; default-directory: "~/local/git/2600hz/test/" -*-
Compilation started at Thu Nov 21 11:44:37

cd "/home/james/local/git/2600hz/test/"; make 

 DEP    hex_core (e57b4fb15cde710b3ae09b1d18f148f6999a63cc)
Evaluating config script "/home/james/local/git/2600hz/test/.erlang.mk/rebar3/_build/default/lib/rebar/src/rebar.app.src.script"
===> Verifying dependencies...
===> Analyzing applications...
===> Compiling cf
===> Compiling cth_readable
===> Compiling certifi
===> Compiling eunit_formatters
===> Compiling getopt
===> Compiling providers
===> Compiling bbmustache
===> Compiling ssl_verify_fun
===> Compiling relx
===> Compiling erlware_commons
===> Compiling rebar
===> Verifying dependencies...
===> Cleaning out bbmustache...
===> Cleaning out certifi...
===> Cleaning out cf...
===> Cleaning out cth_readable...
===> Cleaning out erlware_commons...
===> Cleaning out eunit_formatters...
===> Cleaning out getopt...
===> Cleaning out providers...
===> Cleaning out rebar...
===> Cleaning out relx...
===> Cleaning out ssl_verify_fun...
===> Verifying dependencies...
===> Analyzing applications...
===> Compiling cf
===> Compiling cth_readable
===> Compiling certifi
===> Compiling eunit_formatters
===> Compiling getopt
===> Compiling providers
===> Compiling bbmustache
===> Compiling ssl_verify_fun
===> Compiling relx
===> Compiling erlware_commons
===> Compiling rebar
===> Building escript for rebar...
/home/james/local/git/2600hz/test
make[1]: Entering directory '/home/james/local/git/2600hz/test/deps/hex_core'
 XYRL   safe_erl_term.xrl
Parsing file src/safe_erl_term.xrl, contained 9 rules.
NFA contains 83 states, DFA contains 40 states, minimised to 20 states.
Writing file src/safe_erl_term.erl, ok
 DEPEND hex_core.d
 ERLC   hex_api.erl hex_api_auth.erl hex_api_key.erl hex_api_organization.erl hex_api_organization_member.erl hex_api_package.erl hex_api_package_owner.erl hex_api_release.erl hex_api_user.erl hex_core.erl hex_erl_tar.erl hex_filename.erl hex_http.erl hex_http_httpc.erl hex_licenses.erl hex_pb_names.erl hex_pb_package.erl hex_pb_signed.erl hex_pb_versions.erl hex_registry.erl hex_repo.erl hex_tarball.erl safe_erl_term.erl
Old inliner: threshold=0 functions=[{'erlang_++',3},
                                    {lists_reverse,2},
                                    {cons,3},
                                    {m_overwrite,3},
                                    {v_ok,3},
                                    {id,2}]
Old inliner: threshold=0 functions=[{'erlang_++',3},
                                    {lists_reverse,2},
                                    {cons,3},
                                    {m_overwrite,3},
                                    {v_ok,3},
                                    {id,2}]
Old inliner: threshold=0 functions=[{'erlang_++',3},
                                    {lists_reverse,2},
                                    {cons,3},
                                    {m_overwrite,3},
                                    {v_ok,3},
                                    {id,2}]
Old inliner: threshold=0 functions=[{'erlang_++',3},
                                    {lists_reverse,2},
                                    {cons,3},
                                    {m_overwrite,3},
                                    {v_ok,3},
                                    {id,2}]
Old inliner: threshold=0 functions=[{yyaction_8,0},
                                    {yyaction_7,1},
                                    {yyaction_6,1},
                                    {yyaction_5,2},
                                    {yyaction_4,2},
                                    {yyaction_3,2},
                                    {yyaction_2,3},
                                    {yyaction_1,3},
                                    {yyaction_0,2}]
 APP    hex_core.app.src
make[1]: Leaving directory '/home/james/local/git/2600hz/test/deps/hex_core'
 DEP    amqp_client (3.12.14)
make[1]: Entering directory '/home/james/local/git/2600hz/test/deps/amqp_client'
 DEP    rabbit_common (3.12.14)
 DEP    rabbit_common (3.12.14)
 DEP    rabbit_common (3.12.14)
 DEP    rabbit_common (3.12.14)
 DEP    rabbit_common (3.12.14)
 DEP    rabbit_common (3.12.14)

BREAK: (a)bort (A)bort with dump (c)ontinue (p)roc info (i)nfo
       (l)oaded (v)ersion (k)ill (D)b-tables (d)istribution
@jamesaimonetti
Copy link
Contributor Author

Side note, have you documented why you stopped creating releases or tags for erlang.mk? This instability gives us pause on continuing to use erlang.mk when it only seems to be setup to fetch the latest.

@essen
Copy link
Member

essen commented Nov 21, 2024

I create them on a need basis. If you need one you can ask me. Commit also works as a way to pin the version. Default is to use the latest.

Tags or not I need people to upgrade at some point and open tickets to fix the issues. :)

I will try to reproduce.

@essen
Copy link
Member

essen commented Nov 21, 2024

To pin you can define ERLANG_MK_COMMIT = commit_or_tag in your Makefile and when it upgrades it'll use this version.

@essen
Copy link
Member

essen commented Nov 21, 2024

You should also only hit this if you have manually upgraded, as you are supposed to commit the updated Erlang.mk file.

@essen
Copy link
Member

essen commented Nov 21, 2024

I can reproduce.

@essen
Copy link
Member

essen commented Nov 21, 2024

I have merged the fix. Closing, thanks!

@essen essen closed this as completed Nov 21, 2024
@jamesaimonetti
Copy link
Contributor Author

Thanks! We'll re-evaluate adding erlang.mk to the repo

@essen
Copy link
Member

essen commented Nov 21, 2024

If you don't embed the file I highly recommend setting ERLANG_MK_COMMIT to avoid untimely upgrades. It doesn't need a tag, but if you prefer then I can add one.

I will have a few heavy changes to Erlang.mk in the coming couple weeks so it's possible that I break a few things again. Goal is to get #979 (native Elixir support) merged and use that instead of Mix to build the RabbitMQ CLI.

@essen
Copy link
Member

essen commented Nov 22, 2024

Could you give me a rough list of the OSS projects you fetch from Hex? I will add them to the test suite.

@jamesaimonetti
Copy link
Contributor Author

Only amqp_client in fact; all others are vendored under our Github org.

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

No branches or pull requests

2 participants