Stop using Mix.env
noma4i opened this issue · comments
Make sure these boxes are checked before submitting the issue:
- I have provided steps to reproduce the issue.
I want to use elastic in my release. - I have explained clearly what is happening, and what I expect to happen.
I expect that release will work, and it doesn't
Elixir app release is compiled w/o Mix while it's not clear during compiling process it will lead to a app crash right after Mix.* will be evaluated.
Culprit: https://github.com/radar/elastic/blob/master/lib/elastic/index.ex#L81
Steps to reproduce: use exrm/distillery to build release, start. Execute code related to elastic lookup, get erl_crash.dump
And by steps I mean an exact walkthrough. Your steps that have been provided so far are extremely vague.
This issue is about using Elastic package in compiled release. Problem comes from the nature of beam application which doesn't have Mix.* module included by default and is not welcome to be included in compiled release.
Exrm discussion about Mix in release
bitwalker/exrm#67 (comment)
Example issue with same problem
honeybadger-io/honeybadger-elixir#8
Rabbitmq - same issue
rabbitmq/rabbitmq-cli#174
Please submit a patch to fix this issue.
Verbal fix: don't code like that in the future.
Pull request will be done later.