barrel-db / rebar3_elixir_compile

Elixir rebar3 compiler plugin
Other
90 stars 29 forks source link

Failed creating providers #15

Open drozzy opened 7 years ago

drozzy commented 7 years ago

Hi, guys.

Trying to run this on Windows 10, from erlang rebar3 project, with an elixir dependency extreme.

Here is my rebar3.config:

{erl_opts, [debug_info]}.

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

{deps, [
    {extreme, {elixir, "extreme", "0.7.0"}}
]}.

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

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

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

        {extended_start_script, true}]
}.

{profiles, [{prod, [{relx, [{dev_mode, false},
                            {include_erts, true}]}]
            }]
}.

{provider_hooks, [
  {pre, [{compile, {ex, compile}}]}
]}.

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

Here is my attempt at compiling it, with debug turned on:

$ DEBUG=1 rebar3 compile
===> Load global config file c:/Users/Andriy/.config/rebar3/rebar.config
===> Not adding provider hex user from module rebar3_hex_user because it already exists from module rebar3_hex_user
===> Not adding provider hex cut from module rebar3_hex_cut because it already exists from module rebar3_hex_cut
===> Not adding provider hex config from module rebar3_hex_config because it already exists from module rebar3_hex_config
===> Not adding provider hex key from module rebar3_hex_key because it already exists from module rebar3_hex_key
===> Not adding provider hex info from module rebar3_hex_info because it already exists from module rebar3_hex_info
===> Not adding provider hex owner from module rebar3_hex_owner because it already exists from module rebar3_hex_owner
===> Not adding provider hex docs from module rebar3_hex_docs because it already exists from module rebar3_hex_docs
===> Not adding provider hex search from module rebar3_hex_search because it already exists from module rebar3_hex_search
===> Not adding provider hex publish from module rebar3_hex_pkg because it already exists from module rebar3_hex_pkg
===> sh info:
        cwd: "d:/Projects/bee-publisher/beepub"
        cmd: elixir -e 'IO.puts :code.lib_dir(:elixir)'

===>         opts: []

===> Port Cmd: cmd /q /c elixir -e 'IO.puts :code.lib_dir(:elixir)'
Port Opts: [exit_status,{line,16384},use_stdio,stderr_to_stdout,hide,eof]

===> sh(cmd /q /c elixir -e 'IO.puts :code.lib_dir(:elixir)')
failed with return code 255 and the following output:
' was unexpected at this time.

===> throw: rebar_abort [{rebar_utils,debug_and_abort,2,
                                 [{file,
                                   "/home/tristan/Devel/rebar3/_build/default/lib/rebar/src/rebar_utils.erl"},
                                  {line,585}]},
                                {rebar_utils,sh,2,
                                 [{file,
                                   "/home/tristan/Devel/rebar3/_build/default/lib/rebar/src/rebar_utils.erl"},
                                  {line,182}]},
                                {rebar3_elixir_compile_util,get_details,1,
                                 [{file,
                                   "d:/Projects/bee-publisher/beepub/_build/default/plugins/rebar3_elixir_compile/src/rebar3_elixir_compile_util.erl"},
                                  {line,66}]},
                                {rebar3_elixir_compile,init,1,
                                 [{file,
                                   "d:/Projects/bee-publisher/beepub/_build/default/plugins/rebar3_elixir_compile/src/rebar3_elixir_compile.erl"},
                                  {line,8}]},
                                {rebar_state,
                                 '-create_logic_providers/2-fun-0-',2,
                                 [{file,
                                   "/home/tristan/Devel/rebar3/_build/default/lib/rebar/src/rebar_state.erl"},
                                  {line,409}]},
                                {lists,foldl,3,
                                 [{file,"lists.erl"},{line,1263}]},
                                {rebar_state,create_logic_providers,2,
                                 [{file,
                                   "/home/tristan/Devel/rebar3/_build/default/lib/rebar/src/rebar_state.erl"},
                                  {line,408}]},
                                {rebar_plugins,'-handle_plugins/4-fun-0-',4,
                                 [{file,
                                   "/home/tristan/Devel/rebar3/_build/default/lib/rebar/src/rebar_plugins.erl"},
                                  {line,84}]}]
===> Failed creating providers. Run with DEBUG=1 for stacktrace or consult rebar3.crashdump.

benoitc commented 7 years ago

cc @sivsushruth

benoitc commented 7 years ago

@drozzy we didn't test it with window yet, sounds like an issue whith the way the command line is used. Having a look on it ASAP

drozzy commented 7 years ago

Yeah, would be nice to have it work on windows. In the meantime, I'll try it on mac.

drozzy commented 7 years ago

Same error on Mac by the way.

On Linux it works great (after running mix local.rebar).

benoitc commented 7 years ago

@sivsushruth bump.

benoitc commented 7 years ago

@sivsushruth ping.

sivsushruth commented 7 years ago

Hey, I will fix it over the weekend. Apologies for delay folks.