barrel-db / rebar3_elixir_compile

Elixir rebar3 compiler plugin
Other
90 stars 29 forks source link

Build only works correctly on first call to 'rebar3 shell' #33

Closed cbaggers closed 5 years ago

cbaggers commented 6 years ago

Sorry for the wall of text, I'm still new enough at erlang to not know how best to reduce the noise in this issue and make something more concise.

I am using an elixir docker image so I'm pretty sure erlang & elixir are set up correctly.

I've set up mix for the user I'm using and I can put {aws, {elixir, "aws" ,"0.5.0"}} in my rebar.config file as a dep and it fails with {"no such file or directory", "httpoison.app"}. (This seems like it could be related to https://github.com/barrel-db/rebar3_elixir_compile/issues/30)

I add a keep adding the libraries it complains about as elixir dependencies and I end up getting a build that works..once.

rebar shell will run correctly if I first delete rebar.config, if I don't it fails with Failed to fetch and copy dep: {elixir,"gettext","0.10"} (which is one of the dependencies I has previous added to the deps section in order to get it to build).

My rebar.config file can be found below. Any advice is tracking this down would be hugely appreciated.

{erl_opts, [debug_info,
            {parse_transform, lager_transform}]}.

{elixir_opts, [{env, dev}]}.

{plugins, [rebar3_run,
           {rebar3_elixir_compile, ".*", {git, "https://github.com/barrel-db/rebar3_elixir_compile.git", {branch, "master"}}}]}.

{deps, [% erlang deps
        {cowboy, "2.4.0"}
        ,{hackney, "1.12.1"}
        ,{jiffy, "0.15.2"}
        ,{lager, "3.6.2"}
        ,{pgsql, "26.0.2"}
        ,{uuid, "1.7.3", {pkg, uuid_erl}}
        ,{bcrypt, "1.0.2"}
        ,{episcina, {git, "git://github.com/erlware/episcina.git", "596889c75f52f443bd6f29ce84aded6806c6fa89"}}

        % elixir deps
        ,{aws, {elixir, "aws" ,"0.5.0"}}
        % needed to fix missing file issues
        ,{dialyxir, {elixir, "dialyxir", "0.5.0"}}
        ,{poison, {elixir, "poison", "3.1"}}
        ,{timex, {elixir, "timex", "3.1"}}
        ,{tzdata, {elixir, "tzdata", "0.1.8"}}
        ,{gettext, {elixir, "gettext", "0.10"}}
        ,{ex_doc, {elixir, "ex_doc", "0.15.0"}}
        ,{httpoison, {elixir, "httpoison", "0.11.1"}}
        ,{combine, {elixir, "combine", "0.10.0"}}
        ]}.

{relx, [{release, { cowboy_hello_world, "0.1.0" },
         [cowboy_hello_world, sasl]},

        {sys_config, "./config/sys.dev.config"},
        {vm_args, "./config/vm.args"},

        {dev_mode, true},
        {include_erts, false},

        {extended_start_script, true}]}.

{dist_node, [
    {setcookie, cookie},
    {name, 'app@cbhost0.com'}
]}.

{profiles,
  [{prod,
    [{relx, [{dev_mode, false},
             {sys_config, "./config/sys.prod.config"},
             {include_erts, true}]}]}]}.
cbaggers commented 6 years ago

Gave up and regenerated the erlang aws bindings so it had the functions I needed.

benoitc commented 6 years ago

do you have still have the debug log around ?

cbaggers commented 5 years ago

Afraid not, sorry I didn't see your feedback