Fixing DrabTestApp deployment crash #35
Merged
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Elixir 1.5.2
OTP 20.1
Starting an app with Drab in deployment is throwing:
It looks like it is missing a case clause at: https://github.com/grych/drab/blob/master/lib/drab/supervisor.ex#L20
As per the docs at https://hexdocs.pm/elixir/Code.html#ensure_compiled/1 it can return a variety of different returns, and
{:error, :embedded}
is the one it returns when the system is deployed and no code can change (always assume the code exists in embedded mode if it is included at all).Thus I'm altering the :error clause to be
{:error, :_}
as this file does not exist in your releases anyway (you really should be using a macro'd Mix environment call to test this).Had to make the change locally as well, meaning it will be wiped when I update, so please have this PR in by then. ^.^;