erlef / setup-beam

Set up your BEAM-based GitHub Actions workflow (Erlang, Elixir, Gleam, ...)
MIT License
381 stars 52 forks source link

Selecting "3" for rebar version doesn't select the latest version compatible with selected OTP version #307

Open pguyot opened 1 month ago

pguyot commented 1 month ago

The bug

When choosing "3" for rebar.version, the latest rebar 3 is selected while it was expected to have the latest rebar3 compatible with the selected OTP version (typically not 3.24.0 for OTP 21).

See: https://github.com/pguyot/AtomVM/actions/runs/11433923118/job/31806652030

How to replicate

https://github.com/pguyot/AtomVM/actions/runs/11433923118/workflow

    - uses: erlef/setup-beam@v1
      with:
        otp-version: ${{ matrix.otp }}
        elixir-version: ${{ matrix.elixir_version }}
        rebar3-version: "3"
        hexpm-mirrors: |
          https://builds.hex.pm
          https://repo.hex.pm
          https://cdn.jsdelivr.net/hex

Expected behaviour

Action should pick up a version of rebar3 that works with the selected OTP version.

paulo-ferraz-oliveira commented 1 month ago

I don't think this is a bug (thus I removed the label) since there's no promise that the action should do what you're asking for. It might be a feature request for somebody to implement, though. 🤷

paulo-ferraz-oliveira commented 1 month ago

Also, fwiw, there's an ongoing attempt to identify the rebar3 vs Erlang/OTP version compatibility list: https://github.com/erlang/rebar3/pull/2918/files, in case somebody's interested. We'd discussed in the action, elsewhere, if any of such compatibility should be known/kept next to the action and we decided on "No", but as always stuff's revisitable.