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

Use rebar3_erlydtl_plugin #4

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

bitwalker
Copy link

This PR switches over to using the officially recommended rebar3 plugin for erlydtl, and simultaneously addresses an issue which prevents edump from compiling under Mix.

Mix uses rebar3 bare compile --paths <path>, and as far as I can tell, this prevents a post hook of {compile, {default, escriptize}} or {compile, escriptize} from working. The latter doesn't work at all (it complains about escriptize being unavailable), and the former fails during the escriptize task because it is unable to find the .app file for dependencies, since it is ignoring the bare configuration which overrides the paths (at least that's my assumption). It ends up looking in the local _build/default/... path, rather than in the path provided via rebar3 bare compile --paths <path>, and of course there is nothing there.

The fix for this last bit is to simply remove the escriptize hook for now, since I suspect it's not that important that it be automatically escriptized when compiling, and anyone who wants the escript can just run rebar3 escriptize themselves, and this allows other libraries to include edump. In my particular case, I want to provide a plugin for Distillery which includes edump in a release, and exposes a bin/myapp edump <path to crash dump> command. Right now I can't do that, since it isn't possible to compile a Mix project with edump as a dependency.

Let me know if you have any questions or concerns, I'm happy to help work it out!

- Uses official rebar3 plugin for erlydtl
- Removes escriptize hook so it compiles under `rebar3 bare compile`
used by Mix
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.

1 participant