Repository navigation
Conversation
|
Ah this function is Erlang 25+. So, if we need to be compatible with older version we need to provide the function. |
024134a to
1acfa01
Compare
|
Right now, we're supporting 20+, but I have a PR (#504) that's waiting for Robert's approval which will remove Erlang 20 and 21 (mostly just to make our lives easier with CI/CD and avoid the need for maintaining custom build images for versions of Ubuntu that GH doesn't support). |
|
If you ran into this issue in a mix plugin, it should be fixed there (or in whatever the mix plugin is calling). There's a long discussion going on about that right now :-) However! This change is absolutely tool agnostic, so I have no objections to it :-) That being said, when looking at the code it seems a bit redundant ... extra work for no apparent reason. As such, I'd recommend the addition of a code comment before the call to ensure_path_exists/1 in beam_write_module/2, something along the lines of "this additional check was added to support special-case situations where LFE was being compiled to non-standard paths using tools that expected these paths to already exist." |
This is the last bit I wrote about this. We can accept this patch since it won't cause much problems, but I'll try to understand where and in which tool the path should be created. Also, I have no objections in retiring this PR. |
1acfa01 to
b1cefa5
Compare
oubiwann
left a comment
There was a problem hiding this comment.
👍 from me :-)
We'll see what Robert has to say!
|
I think I got what's going on... The LFE is been compiled first to the rebar3 cache. Later on, the pre_hook is executed with |
this happend when integrating with a mix project.
e229c1d to
9f59b34
Compare
* Makefile: split DESTDIR and PREFIX (#513) * Makefile: use portable "command -v" instead of the "which" command Signed-off-by: Maciej Barć <[email protected]> * Makefile: split DESTDIR and PREFIX * Use DESTDIR as the output directory, default to /. Normally it would be used like so: make DESTDIR="$(pwd)/image/" install * Run MANDB only if DESTDIR is /, so only when we install onto the system root. Signed-off-by: Maciej Barć <[email protected]> --------- Signed-off-by: Maciej Barć <[email protected]> * Bug/517/otp 28 user drv (#518) * Added failing tests for issue #517. See: #517 * Fix for OTP 28 user_drv behaviour change. Three-branch version dispatch using list_to_integer(OTPRelease) instead of string comparison: - OTP 28+: user_drv:start(#{initial_shell => noshell, input => cooked}) — provides the required input key - OTP 26-27: user_drv:start(#{initial_shell => noshell}) — unchanged, input defaults to true - OTP <26: user:start() — the legacy API * Updated OTP versions for CI. * Implement this less awkwardly. * We need the full build for the new CT test. * Addressed review feedback. * ensure directory exists before writing the beam file... (#508) this happend when integrating with a mix project. * Feature/271/clj prints (#519) * Added tests for new clj print macros. * Implemented clj print functions. * Updated docs. * Feature/277/clj update in (#520) * Added implementations for update, update-in, assoc, assoc-in. * Updated docs for new clj functions/macros. * Fix lfe_init_SUITE ERL_LIBS to target the compiled lfe app The suite spawns bin/lfe and set ERL_LIBS to the repo root, which is not a valid OTP library directory for the lfe app: the compiled beams (including lfe_init.beam) live in _build/<profile>/lib/lfe/ebin, while the root ebin/ holds only lfe.app. bin/lfe could therefore only find lfe_init via its fallback rebar3 path, which defaults to the `default` profile. CI stayed green because the builds job runs `rebar3 compile` (populating _build/default/lib/lfe/ebin) before `make ct`. A bare `rebar3 ct` -- or `make tests`, which cleans _build and builds only the test profile -- never populates the default profile, so lfe_init was absent from the resolved code path and the kernel user child failed with {undef,[{lfe_init,start,[],[]}...]}. Derive ERL_LIBS from the running app instead: the parent of code:lib_dir('lfe') is the actual _build/<profile>/lib dir containing the compiled lfe app, making the suite independent of which rebar3 profile happens to be pre-built. bin/lfe is still located from the repo root as before. Co-Authored-By: Claude Opus 4.8 (1M context) <[email protected]> --------- Signed-off-by: Maciej Barć <[email protected]> Co-authored-by: Maciej Barć <[email protected]> Co-authored-by: Bruno Dias <[email protected]> Co-authored-by: Claude Opus 4.8 (1M context) <[email protected]>
This happend when integrating with a mix project.
From this image, the lfe path inside the
prod/libwasn't created.Ensuring the directory is created fixed the problem, but not sure who should be responsible for creating the directory.
This patch fixes the lfe (tool) compilation. There is still issue on the rebar/mix integration to be addressed.
closes #489