erlef / rebar3_hex

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

Erlang 25 (in)compatibility (due to builds being produced on Erlang 21?) #306

Closed michaelklishin closed 2 years ago

michaelklishin commented 2 years ago

From what I can tell, the binary release of this project contains modules compiled with Erlang/OTP 21. Otherwise I cannot explain why this is the only plugin that Rebar 3.18.1 cannot load on Erlang 25.0-rc.2. The failure is as follows:

.cache/rebar3/plugins/rebar3_hex/ebin/rebar3_hex.beam failed: badfile

A more complete output:

Loading of /path/to/.cache/rebar3/plugins/rebar3_hex/ebin/rebar3_hex.beam failed: badfile

===> Fetching rebar3_proper v0.12.1
===> Analyzing applications...
===> Compiling rebar3_proper
===> Fetching coveralls v2.2.0
===> Fetching jsx v2.10.0
===> Analyzing applications...
===> Compiling jsx
===> Compiling coveralls
===> Fetching rebar3_lint v1.0.2
===> Fetching elvis_core v1.3.2
===> Fetching katana_code v1.1.2
===> Fetching zipper v1.0.1
===> Analyzing applications...
===> Compiling zipper
===> Compiling katana_code
===> Compiling elvis_core
===> Compiling rebar3_lint
===> Fetching rebar3_bsp (from {git,"https://github.com/erlang-ls/rebar3_bsp.git",
                      {ref,"master"}})
===> Analyzing applications...
===> Compiling rebar3_bsp
===> Verifying dependencies...
===> Fetching docsh v0.7.2
===> Fetching elvis_core v1.3.1
===> Fetching ephemeral v2.0.4
===> Fetching rebar3_elixir v0.2.4
===> Fetching rebar3_hex v6.10.3
===> Fetching hex_core v0.7.1
===> Fetching verl v1.0.2
===> Analyzing applications...
===> Compiling hex_core
===> Compiling verl
===> Compiling rebar3_hex
_build/default/plugins/rebar3_hex/src/rebar3_hex_repo.erl:128:32: Warning: public_key:ssh_encode/2 is removed; use ssh_file:encode/2 instead

===> Analyzing applications...
===> Compiling rebar3_elixir
===> Fetching erlfmt (from {git,"https://github.com/gomoripeti/erlfmt.git",
                  {ref,"d4422d1fd79a73ef534c2bcbe5b5da4da5338833"}})
===> Fetching gradualizer (from {git,"https://github.com/josefs/Gradualizer.git",
                       {ref,"6e89b4e1cd489637a848cc5ca55058c8a241bf7d"}})
===> Fetching jsx v3.0.0
===> Fetching rebar3_format v0.8.2
===> Fetching redbug v2.0.6
===> Fetching tdiff v0.1.2
===> Fetching uuid v2.0.1
===> Fetching yamerl (from {git,"https://github.com/erlang-ls/yamerl.git",
                  {ref,"9a9f7a2e84554992f2e8e08a8060bfe97776a5b7"}})
===> Fetching bucs v1.0.16
===> Fetching katana_code v0.2.1
===> Fetching providers v1.8.1
===> Fetching quickrand v2.0.1
===> Fetching zipper v1.0.1
===> Fetching getopt v1.0.1
===> Analyzing applications...
===> Compiling redbug

Would it be possible to produce a version built on Erlang 22? 21 is pretty retro, modern Elixir is tested on 23+ and Rebar 3 itself on 22+.

starbelly commented 2 years ago

A couple of issues :

  1. You are indeed using an outdated version of rebar3_hex (v6.x.x).
  2. We don't do binary releases of rebar3_hex, when you pull it in from hex it gets compiled on your machine. It looks like you have some stale cache hanging around.

If you have rebar3_hex declared as a global plugin you can try rebar3 as global plugins upgrade rebar3_hex

You might need to blow the cache away.

michaelklishin commented 2 years ago

Thanks @starbelly.

rm -rf ~/.cache/rebar3

and

rebar3 as global plugins upgrade rebar3_hex

seem to have helped. Sorry about the noise!

starbelly commented 2 years ago

No worries! Not noise to me 😁 ❤️