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

rebar3 compile crash as init is expecting {error, string()} #11

Closed
shamis opened this issue Jul 29, 2019 · 3 comments
Closed

rebar3 compile crash as init is expecting {error, string()} #11

shamis opened this issue Jul 29, 2019 · 3 comments

Comments

@shamis
Copy link

shamis commented Jul 29, 2019

rebar3 version 3.11.1
mix version 1.91.
using https://github.com/sqoring/rebar_mix_example

===> sh info:
        cwd: "c:/vagrant/ubuntu/tmp/rebar_mix_example"
        cmd: elixir -e ':code.get_path |> Enum.filter(fn(p) -> String.contains?(List.to_string(p), "/elixir/") end) |> Enum.map(&IO.puts/1)'

===>    opts: [{env,[{"ERL_FLAGS",[]}]},
               {return_on_error,true},
               {use_stdout,false}]

===> Port Cmd: cmd /q /c elixir -e ':code.get_path |> Enum.filter(fn(p) -> String.contains?(List.to_string(p), "/elixir/") end) |> Enum.map(&IO.puts/1)'
Port Opts: [{env,[{"ERL_FLAGS",[]}]},
            exit_status,
            {line,16384},
            use_stdio,stderr_to_stdout,hide,eof]

===> error: badarg [{erlang,'++',
                        [{rebar_mix_elixir_finder_hook,elixir_command_failed},
                         "~n"],
                        []},
                    {rebar_state,'-create_logic_providers/2-fun-0-',2,
                        [{file,"/opt/rebar3-3.11.1/src/rebar_state.erl"},
                         {line,481}]},
                    {lists,foldl,3,[{file,"lists.erl"},{line,1263}]},
                    {rebar_state,create_logic_providers,2,
                        [{file,"/opt/rebar3-3.11.1/src/rebar_state.erl"},
                         {line,478}]},
                    {rebar_plugins,'-handle_plugins/4-fun-0-',4,
                        [{file,"/opt/rebar3-3.11.1/src/rebar_plugins.erl"},
                         {line,101}]},
                    {lists,foldl,3,[{file,"lists.erl"},{line,1263}]},
                    {rebar_plugins,handle_plugins,4,
                        [{file,"/opt/rebar3-3.11.1/src/rebar_plugins.erl"},
                         {line,99}]},
                    {lists,foldl,3,[{file,"lists.erl"},{line,1263}]}]
===> Failed creating providers. Run with DEBUG=1 for stacktrace or consult rebar3.crashdump.

Not sure if this should be rebar3 issue https://github.com/erlang/rebar3/blob/3.11.1/src/rebar_state.erl#L481. Should format_error be called here ?

@ferd
Copy link
Contributor

ferd commented Jul 29, 2019

It needs confirmation on whether running the same shell command returns a status code that fits the range there, but if so, that would explain it.

@ferd
Copy link
Contributor

ferd commented Jul 29, 2019

From Slack:

It has been fixed in master
using the master this error is not reproducible. But it seems like master is not tagged and pushed to hex

@shamis
Copy link
Author

shamis commented Jul 30, 2019

closing the issue as only thing to be done is to tag and push to hex

@shamis shamis closed this as completed Jul 30, 2019
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

2 participants