rebar3 icon indicating copy to clipboard operation
rebar3 copied to clipboard

The Real Slim Wrapper

Open x80486 opened this issue 4 years ago • 1 comments

I would like to propose the idea of a "wrapper" — that I know you've probably heard of already.

The idea is (again, even though I know you might know) to have (1) a couple of shell scripts for the supported platforms (read: Windows, UNIX/Linux, etc.) that normalize all the calls to rebar3, if required; (2) a binary in the repo that could be rebar3 itself or something else that downloads the proper version referred by (3) a file that pins the actual version the repository is actually using.

For instance, I'm really describing what Gradle does in this regard:

image

As you can see the gradle-wrapper.properties holds the version the repo is using and some other configuration settings for runtime behavior, etc.; the file gradle-wrapper.jar contains just code for downloading the Gradle distribution.

With this approach, one would only need to know which version of Erlang/OTP you would like to use (there are even constraints inside the same rebar.config for this) and just executing those shell scripts will take care of downloading and/or updating the proper rebar3 distribution (if not present already) and from that point on, the rest, should be a piece of cake.

Now I have no idea if the way rebar3 works could allow this sort of approach, but if it does, it could be a really nice to have, making Erlang/OTP projects a little bit more self-contained build-wise — kiss good-bye all those rebar version managers 😜

x80486 avatar May 26 '21 01:05 x80486

  1. I think it's a good idea and it would make sense to provide something like that since we won't be able to add rebar3 to erlang itself soon enough
  2. I don't personally want to sign up for running a proper installation of rebar3 on all OSes and figuring out all the Erlang installers either
  3. There's a thing we do to get the latest version with rebar3 local install and rebar3 local upgrade that can possibly be an interesting basis, but we don't have the rich set of pre-built rebar3s for all OTP installs on all versions to work from either way

ferd avatar May 26 '21 16:05 ferd