Skip to content

Conversation

rNoz
Copy link
Contributor

@rNoz rNoz commented Jul 31, 2025

This PR allows using an env var ERLEXEC_REBAR_COMPILE_INFO to execute both Makefile targets info and all (aka compile) at once, helpful when being compiled from Elixir. Therefore, in case errors like priv/false* appear in the future, we can track what was the compilation log, since it just emits 6 lines and can be beneficial to understand the origin of the trouble. In the end, it is optional.

  • "priv/false" or any error like :failed_to_start_child, :exec, {:bad_return_value... indicating the exec-port is not found/available.

For instance, two examples when being executed from Elixir toolchain.

a) while building normally:

$ mix do deps.compile erlexec, compile
make: Nothing to be done for `all'.
===> Analyzing applications...
===> Compiling erlexec
==> project
Generated project app

b) using this feature:

$ ERLEXEC_REBAR_COMPILE_INFO=1 mix do deps.compile erlexec, compile
SOURCES: ei++.cpp exec_impl.cpp exec.cpp
OBJECTS: ei++.o exec_impl.o exec.o
TARGET:  aarch64-apple-darwin
MARCH:   aarch64-apple-darwin
OUTPUT:  /Users/user/project/deps/erlexec/priv/aarch64-apple-darwin/exec-port
OUT_DIR: /Users/user/project/deps/erlexec/priv/aarch64-apple-darwin/
make: Nothing to be done for `all'.
===> Analyzing applications...
===> Compiling erlexec
==> project
Generated project app

@saleyn
Copy link
Owner

saleyn commented Aug 1, 2025

I added this functionality using a more compact implementstion.

@saleyn saleyn closed this Aug 1, 2025
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.

2 participants