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

Add erts as an explicit dependency #14

Closed
dumbbell opened this issue Aug 10, 2023 · 0 comments · Fixed by #15
Closed

Add erts as an explicit dependency #14

dumbbell opened this issue Aug 10, 2023 · 0 comments · Fixed by #15
Labels
bug Something isn't working
Milestone

Comments

@dumbbell
Copy link
Member

dumbbell commented Aug 10, 2023

Why

Horus relies on the availability of erts to initialize the list of modules to skip when it needs to decide if a call should be followed to extract a function or if the call should be preserved as is.

It already depends on kernel and stdlib for instance. I assumed that erts was implicit as I don't see how Erlang can work without it. It looks like if erts is not included explicitly in an Erlang release file or in the applications it bundles, it is excluded from the release (the erts Erlang application, not the actual runtime). This breaks Horus because it won't know about e.g. the erlang module and will try and fail to extract functions from that module.

See rabbitmq/khepri#212 and rabbitmq/khepri#222 for users who encountered this problem. A function extraction will fail with {horus_ex, module_not_found, #{module => erlang}} if erts is missing from a release.

How

It looks like a bug in the way releases are created because, to me, it makes no sense to not always include erts (like kernel and stdlib).

As a workaround, we should include erts in the dependencies of Horus.

@dumbbell dumbbell added this to the v0.2.4 milestone Aug 10, 2023
dumbbell added a commit that referenced this issue Aug 21, 2023
[Why]
Horus relies on the availability of `erts` to initialize the list of
modules to skip when it needs to decide if a call should be followed to
extract a function or if the call should be preserved as is.

It already depends on `kernel` and `stdlib` for instance. I assumed that
`erts` was implicit as I don't see how Erlang can work without it. It
looks like if `erts` is not included explicitly in an Erlang release
file or in the applications it bundles, it is excluded from the release
(the `erts` Erlang application, not the actual runtime). This breaks
Horus because it won't know about e.g. the `erlang` module and will try
and fail to extract functions from that module.

Fixes #14.
@dumbbell dumbbell added the bug Something isn't working label Aug 21, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant