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

Why is deps.get called? #29

Open
tsloughter opened this issue Aug 8, 2021 · 1 comment
Open

Why is deps.get called? #29

tsloughter opened this issue Aug 8, 2021 · 1 comment

Comments

@tsloughter
Copy link
Collaborator

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/<elixir app>/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
Copy link
Collaborator Author

Ok, a lot more is coming clear, like the protocol consolidation hook removal, now that I've looked at this function that calls deps.get, it also changes how compile is called. Why is it no longer:

    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.

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

No branches or pull requests

1 participant