-
Notifications
You must be signed in to change notification settings - Fork 521
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
escriptize broken when an included app is in _checkouts #1560
Comments
@mrallen1 didn't manage to reproduce in 3.4.1. Think you could try again on a newer version? |
OK, I will update my rebar3 and try again. Thanks! |
@mrallen1 were you able to reproduce or get a fix from a newer version? Wondering if this is still worth investigating. |
I'll give it a go with a new version tomorrow |
I'm having a similar error running "rebar3 bare compile --paths "/Users/tty/Project/testapp/_build/dev/lib/*/ebin"" on cuttlefish ======== ======== MacOSX 10.13.5 |
It is not surprising that bare compilation fails if it must call escriptize, since the escriptize task does not work with a standalone task; it expects a regular rebar3 project. I don't think we can support this easily. |
@mrallen1 was this resolved for you? |
I tried the previous version of rebar3: rebar 3.2.0 on Erlang/OTP 19 Erts 8.3.5.3 |
@ferd I can't remember. AFAIC, it's cool to close this ticket. I'll open a new one if I need to. Thanks. |
3.2.0 is a 2 years old version that was broken and there may have been half-a-dozen patches in there. It's unclear to me if the standalone compiler worked with it by accident and got broken by a fix for Erlang users, or if something in rebar3 that is unrelated broke and caused problems. If you can narrow down versions a little bit, it might help. However, the error you have appears to be on line here: https://github.com/erlang/rebar3/blob/master/src/rebar_prv_escriptize.erl#L247 which would just point to the app not being able to be found anymore. That code was added in 2016, a few days after 3.2.0, here: 6bc8cce#diff-9d4027415800d49d0a03022f3cdb65eb and was to fix issues where escripts would accidentally always contain all applications, which generated files that are too large for what they needed. The error you see happens because the app you're trying to build (or one of its dependencies) mentions an OTP application in its .app file that cannot be found in the current rebar3 state. My guess is just that escriptize depends on a compilation job having been run to populate the state, and the compilation job usually depends on deps having been installed locally within the project, which depends on a local app discovery phase. When running the bare compiler, only the compile job is run, and the rebar3 state is not being pre-populated for escriptize to run properly, explaining the crash. I don't know that there is any fix for this possible. maybe @tsloughter has an idea, but to me it sounds like this task implicitly relies on the rebar3 workflow, and the usage of the bare compiler purposefully undoes that workflow, and so those are just two incompatible goals. |
Did the bare compile provider exist in 3.2.0? |
it started in 2015 (https://github.com/erlang/rebar3/commits/master/src/rebar_prv_bare_compile.erl) so it probably existed, but incidentally did not support the wildcard paths specified by the bug report either, so it might have been all accidental. |
Environment
Current behaviour
Make sure that some project in _checkouts is in the escript_incl_apps list in rebar.config and then:
escriptize works fine when everything is inside of the _build directory via deps or something.
Expected behaviour
Everything is copacetic.
The text was updated successfully, but these errors were encountered: