starbelly / rebar_mix

rebar3 plugin for building Elixir dependencies with mix
Apache License 2.0
0 stars 0 forks source link

Why is deps.get called? #4

Open starbelly opened 1 year ago

starbelly commented 1 year ago

Issue originally reported by @tsloughter in https://github.com/Supersonido/rebar_mix/issues/29

In testing I noticed that mix deps.get is called here https://github.com/Supersonido/rebar_mix/blob/master/src/rebar_mix_utils.erl#L138 which results in a bunch of deps being fetched under _build/default/lib//deps

Why is this the case? They aren't used are they, they aren't built at least so they must not be?

I can send a PR to remove it unless there is a reason it needs to be done.

tsloughter commented 8 months ago

Missing from this issue is the part about compilation. I think it should go back to:

    AppDir = rebar_app_info:dir(AppInfo),
    case sh("elixir -pa \"../*/ebin\" -S mix compile --no-load-deps "
                        "--no-deps-check --no-protocol-consolidation",
                        [{cd, AppDir},
                         {return_on_error, true},
                         {use_stdout, true},
                         {env, [{"MIX_BUILD_PATH", filename:join(AppDir, "../../")},
                                {"MIX_ENV", "prod"}]}]) of
        {error, {127, _}} ->
            {error, {mix_not_found, rebar_app_info:name(AppInfo)}};
        {error, {_Code, Error}} ->
            {error, {mix_compile_failed, rebar_app_info:name(AppInfo), Error}};
        _ ->
            ok
    end.
starbelly commented 8 months ago

@tsloughter I still say we reset this back to the last known working version and then deal with everything else 😄

tsloughter commented 8 months ago

Yea, that is probably best at this point with no response.