Skip to content

fix(elixir_app): pass deps to app_file - #2

Open
TrapsterDK wants to merge 1 commit into
bazelverse:mainfrom
TrapsterDK:pr2
Open

TrapsterDK wants to merge 1 commit into
bazelverse:mainfrom
TrapsterDK:pr2

Conversation

@TrapsterDK

Copy link
Copy Markdown

Problem
elixir_app accepts deps and compiles against them, but does not pass them to app_file. The generated .app file lists only kernel, stdlib, elixir and extra_apps in applications, so OTP does not start the dependency applications first.

Change
Pass deps to app_file. One line. The .app file now lists the dependency apps in applications, so OTP starts them before the app.

Test
test/app_deps: an app that depends on a second app, and a sh_test that checks the applications list of its .app file. On main it fails with {applications,[kernel,stdlib,elixir]}; with the fix it is {applications,[kernel,stdlib,elixir,dep_app]}.

Test output (OTP 29.0, Elixir 1.20.3, Bazel 9.2.0, --nohome_rc)

bazel test //... in test/: Executed 5 out of 5 tests: 5 tests pass. The CI negative checks (failing_test, broken_test, empty_test) fail as expected. The OTP 28.5 / Elixir 1.19.5 pair was not run as a whole.

Assisted by Claude.

elixir_app accepts deps and compiles against them, but did not pass
them to app_file. The generated .app file therefore listed only
kernel, stdlib, elixir and extra_apps in applications, so OTP did not
start the dependency applications first.

Pass deps to app_file. The .app file now lists the dependency apps.

Test: test/app_deps builds an app that depends on a second app and
checks that the applications list of its .app file contains it. The
test fails without the fix.
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