erlef / rebar3_hex

Rebar3 Hex library
Apache License 2.0
101 stars 49 forks source link

Exception in 'rebar3 hex info' when some meta values are 'null' #46

Closed seriyps closed 5 years ago

seriyps commented 8 years ago

It frequently happens that some values (contributors, maintainers, licenses, links) in 'meta' are null instead of list. In this case rebar3 hex info <package> return error

$ DEBUG=1 rebar3 hex info poison
===> Load global config file /home/seriy/.config/rebar3/rebar.config
===> Expanded command sequence to be run: []
===> Expanded command sequence to be run: [{hex,info}]
poison
  Releases: 2.1.0, 2.0.1, 2.0.0, 1.5.2, 1.5.1, 1.5.0, 1.4.0, 1.3.1, 1.3.0, 1.2.1, 1.2.0, 1.1.1, 1.1.0, 1.0.3, 1.0.2, 1.0.1, 1.0.0
===> Uncaught error in rebar_core. Run with DEBUG=1 to see stacktrace
===> Uncaught error: function_clause
===> Stack trace to the error location: [{rebar3_hex_info,
                                                 '-join/1-lc$^0/1-0-',
                                                 [nil],
                                                 [{file,
                                                   "/home/***/.cache/rebar3/plugins/rebar3_hex/src/rebar3_hex_info.erl"},
                                                  {line,184}]},
                                                {rebar3_hex_info,join,1,
                                                 [{file,
                                                   "/home/***/.cache/rebar3/plugins/rebar3_hex/src/rebar3_hex_info.erl"},
                                                  {line,184}]},
<...>
$ rebar3 report "rebar3 hex info poison"
Rebar3 report
 version 3.1.0
 generated at 2016-05-04T22:15:08+00:00
=================
Please submit this along with your issue at https://github.com/erlang/rebar3/issues (and feel free to edit out private information, if any)
-----------------
Task: rebar3
Entered as:
  rebar3 hex info poison
-----------------
Operating System: i686-pc-linux-gnu
ERTS: Erlang/OTP 18 [erts-7.3] [source] [smp:4:4] [async-threads:0] [kernel-poll:false]
Root Directory: /usr/lib/erlang
Library directory: /usr/lib/erlang/lib
-----------------
Loaded Applications:
bbmustache: 1.0.4
certifi: 0.4.0
cf: 0.2.1
compiler: 6.0.3
crypto: 3.6.3
cth_readable: 1.2.2
dialyzer: 2.9
edoc: 0.7.18
erlware_commons: 0.19.0
eunit: 2.2.13
eunit_formatters: 0.3.1
getopt: 0.8.2
inets: 6.2
kernel: 4.2
providers: 1.6.0
public_key: 1.1.1
relx: 3.17.0
sasl: 2.7
snmp: 5.2.2
ssl_verify_hostname: 1.0.5
stdlib: 2.8
syntax_tools: 1.7
tools: 2.8.3

-----------------
Escript path: /usr/local/bin/rebar3
Providers:
  app_discovery as clean compile compile config cover ct cut deps dialyzer do docs edoc escriptize eunit help info install install_deps key list lock new owner path pkgs publish release relup report search shell state tar tree unlock update upgrade upgrade upgrade user version xref 
starbelly commented 5 years ago

@tsloughter AFAIK we don't offer this command anymore... if not, pretty sure this can be closed.