erlef / rebar3_hex

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

"rebar3 hex user whoami" crash #194

Closed lukebakken closed 3 years ago

lukebakken commented 3 years ago

Erlang 23.1.4 on Arch Linux

Commands run from top of Kyorai/cuttlefish repo clone:

rm -rf ~/.cache/rebar3/plugins/
git clean -fxd
DIAGNOSTIC=1 rebar3 hex user whoami 2>&1 | tee ~/issues/tsloughter/rebar3_hex/crash-diagnostic-report.txt
DIAGNOSTIC=1 rebar3 report "hex user whoami" 2>&1 | tee -a ~/issues/tsloughter/rebar3_hex/crash-diagnostic-report.txt

crash-diagnostic-report.txt

lukebakken commented 3 years ago

Aha, clearing out various caches has resolved the issue. No idea why:

(23.1.4)lbakken@shostakovich ~/development/Kyorai/cuttlefish (master %=)
$ rm -rf ~/.cache/rebar3/hex/
(23.1.4)lbakken@shostakovich ~/development/Kyorai/cuttlefish (master %=)
$ rm -rf ~/.cache/rebar3/plugins/
(23.1.4)lbakken@shostakovich ~/development/Kyorai/cuttlefish (master %=)
$ rm -rf ~/.cache/rebar3/lib/
(23.1.4)lbakken@shostakovich ~/development/Kyorai/cuttlefish (master %=)
$ rebar3 hex user whoami
===> Fetching rebar3_hex v6.10.2
===> Fetching hex_core v0.7.1                                                                                                                                                                                                                                                   
===> Fetching verl v1.0.2                                                                                                                                                                                                                                                       
===> Analyzing applications...                                                                                                                                                                                                                                                  
===> Compiling hex_core                                                                                                                                                                                                                                                         
===> Compiling rebar3_hex                                                                                                                                                                                                                                                       
===> Compiling verl                                                                                                                                                                                                                                                             
hexpm : rabbitmq (info@rabbitmq.com)  
starbelly commented 3 years ago

@lukebakken It looks like you were running 6.10.0 in the first instance in which you experienced a crash, but you cleared out a caches and went to 6.10.2 which fixes a backward compat issue with the latest rebar3. I suspect perhaps that was the issue. Are you on the latest rebar3 by chance?

lukebakken commented 3 years ago

Yes, I upgraded rebar3 first (via rebar3 local upgrade), before clearing the caches.

starbelly commented 3 years ago

👍 I'm glad this is resolved for you then! 😀

lukebakken commented 3 years ago

I would assume that if a newer version of rebar3_hex exists that version would be downloaded without me having to clear caches first :man_shrugging:

starbelly commented 3 years ago

@lukebakken I believe it's only explicit upgrades. Maybe an option can be added in rebar3 for global plugins to allow for this.

EDIT: For the future and until something changes in rebar3, in order to upgrade global plugins, even after a local upgrade, you must run : rebar3 as global plugins upgrade <name> where name in this case would be rebar3_hex.