-
Notifications
You must be signed in to change notification settings - Fork 3k
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
shell: read records from module in escript/archive #3002
Conversation
Is this warning still relevant, and if so, will it not have any impact here? |
I don't think there has ever been any formal decision about making archives non-experimental, but I think that the functionality has been used in enough places (especially escript archives) that it will now be impossible to remove. I'll check and see if we can remove that warning. |
To provide some data points, Elixir unzips .ez archives on install, so we don't need runtime support for .ez, but we do use escripts archives extensively. rebar3 is also distributed as an escript archive, right? |
yes, as is erlang_ls and I'm sure many more. If only we could solve the issue with embedding |
RabbitMQ uses archives for its plugins as well. It would be great to solve the |
Hey guys, just a bystander here intrigued by the discussion. |
Yes, this is the problem. I created a ticket for it here so that we do not continue to highjack this PR. |
@garazdawi just one more comment about the whole archives/escripts note. If the goal is to mark them as officially supported, then perhaps we should not merge this PR and instead make it so Otherwise I assume |
I think that we should still merge this as fixing archives will be a lot of work and will not be done before 24. It will be easy to revert this when/if we implement more support for archives and then we will have a testcase that should work no matter what the implementation is.
It would mean that we have to do a |
I did not dare to modify more serious modules like |
Previously the `rr/1` shell function failed with the below error when called for a module which was loaded from an archive or escript archive, because beam_lib:chunks uses regular `file:open/2` to read from the file. Now `erl_prim_loader:get_file/1` is used which supports file paths in archives. ``` {error, beam_lib, {file_error,"<path_to_archive>/test_app.ez/test_app/ebin/test.beam", enotdir}} ```
d9b5ad0
to
955fb43
Compare
Thanks! |
Previously the
rr/1
shell function failed with the below error whencalled for a module which was loaded from an archive or escript archive,
because
beam_lib:chunks
uses regularfile:open/2
to read from thefile. Now
erl_prim_loader:get_file/1
is used which supports file pathsin archives.