mbox series

[bug#54796,v4,00/22] Add importer for hex.pm and rebar3 build-system for Erlang

Message ID cover.1649616716.git.h.goebel@crazy-compilers.com
Headers show
Series Add importer for hex.pm and rebar3 build-system for Erlang | expand

Message

Hartmut Goebel April 10, 2022, 6:57 p.m. UTC
Thanks to Maxime Devos for the review of V3. Do ease review for other
reviewers, here is a complete set of updated patches, incorporating Maxime's
comments.

Cover text from v3:

this is an updated version of #42180 and #51061 (both are closed
already). Notable changes are:

* the „extracting downloader“ and „hexpm-fetch” are gone

* documentation added for both the importer and the rebar3-build-system

* tests added for the importer

Some remarks on the patches:

* First patch adds a file guix/hexpm-download.scm, containing
  definitions for the hex.pm repository. These are combined in
  this module here since different build-systems (will) use it.

* The importer tries to detect the build system to be used. For Elexir
  packages it creates package definitions using the “mix-build-system‘. This I
  will add later (WIP).

* Next there patches provide the packages required rebar3, rebar3 itself and
  some plugins for rebar3.

Open question:

* Shall the build system actually be called „rebar*3*“ or just „rebar“? There
  is also a build-tool „rebar2“, which is obsoltete and not supported by this
  build-system. Anyhow, somewhen in the future there might be some „rebar4“,
  which we might be able to cover with the same build-system. WDYT?

Hartmut Goebel (22):
  import: Add hex.pm importer.
  build-system: Add 'rebar3-build-system'.
  gnu: Add erlang-cf.
  gnu: Add erlang-certifi.
  gnu: Add erlang-erlware-commons.
  gnu: Add erlang-cth-readable.
  gnu: Add erlang-bbmustache.
  gnu: Add erlang-getopt.
  gnu: Add erlang-eunit-formatters.
  gnu: Add erlang-providers.
  gnu: Add erlang-parse-trans.
  gnu: Add erlang-hex-core.
  gnu: Add erlang-ssl-verify-fun.
  gnu: Add erlang-relx.
  gnu: Add erlang-edown.
  gnu: Add erlang-jsone.
  gnu: Add erlang-proper.
  gnu: Add erlang-covertool.
  gnu: Add rebar3.
  gnu: Add rebar3-raw-deps.
  gnu: Add rebar3-git-vsn.
  gnu: Add rebar3-proper.

 Makefile.am                        |   5 +
 doc/guix.texi                      |  70 +++-
 gnu/packages/erlang.scm            | 493 +++++++++++++++++++++++++++++
 guix/build-system/rebar3.scm       | 143 +++++++++
 guix/build/rebar3-build-system.scm | 147 +++++++++
 guix/hexpm-download.scm            |  40 +++
 guix/import/hexpm.scm              | 347 ++++++++++++++++++++
 guix/scripts/import.scm            |   2 +-
 guix/scripts/import/hexpm.scm      | 109 +++++++
 guix/upstream.scm                  |   1 +
 tests/hexpm.scm                    | 257 +++++++++++++++
 11 files changed, 1612 insertions(+), 2 deletions(-)
 create mode 100644 guix/build-system/rebar3.scm
 create mode 100644 guix/build/rebar3-build-system.scm
 create mode 100644 guix/hexpm-download.scm
 create mode 100644 guix/import/hexpm.scm
 create mode 100644 guix/scripts/import/hexpm.scm
 create mode 100644 tests/hexpm.scm

Comments

M April 11, 2022, 12:04 p.m. UTC | #1
Hartmut Goebel schreef op zo 10-04-2022 om 20:57 [+0200]:
> * Shall the build system actually be called „rebar*3*“ or just „rebar“? There
>   is also a build-tool „rebar2“, which is obsoltete and not supported by this
>   build-system. Anyhow, somewhen in the future there might be some „rebar4“,
>   which we might be able to cover with the same build-system. WDYT?

Was the rebar2 --> rebar3 change mostly backwards-compatible, and would
a hypothetical rebar2 or rebar4 build system look mostly the same?
If both hold, I would treat rebar2 --> rebar3 as ‘merely’ a package
update from python@2 to python@3 -- some breaking changes, but no need
for separate build systems (and hence, no 3 suffix)

If rebar2, rebar3 and rebar4 would require completely different phases
and use different file formats or such, IMO a separate build system
(and hence, a 2, 3 or 4 suffix) may be useful.

Greetings,
Maxime.
Ludovic Courtès April 29, 2022, 1:18 p.m. UTC | #2
Hi,

Hartmut Goebel <h.goebel@crazy-compilers.com> skribis:

> Thanks to Maxime Devos for the review of V3. Do ease review for other
> reviewers, here is a complete set of updated patches, incorporating Maxime's
> comments.

Unless Maxime has further comments, this patch series looks ready to me,
modulo the cosmetic changes I suggested (some of which can be made
afterwards).

Hartmut, can we remove guix/extracting-download.scm now?

Thanks folks for all the work!

Ludo’.
M April 29, 2022, 2:33 p.m. UTC | #3
Ludovic Courtès schreef op vr 29-04-2022 om 15:18 [+0200]:
> Hi,
> 
> Hartmut Goebel <h.goebel@crazy-compilers.com> skribis:
> 
> > Thanks to Maxime Devos for the review of V3. Do ease review for other
> > reviewers, here is a complete set of updated patches, incorporating Maxime's
> > comments.
> 
> Unless Maxime has further comments, this patch series looks ready to me,
> modulo the cosmetic changes I suggested (some of which can be made
> afterwards).

No further comments.

Greetings,
Maxime.
Hartmut Goebel May 5, 2022, 12:56 p.m. UTC | #4
Am 11.04.22 um 14:04 schrieb Maxime Devos:
> If rebar2, rebar3 and rebar4 would require completely different phases
> and use different file formats or such, IMO a separate build system
> (and hence, a 2, 3 or 4 suffix) may be useful.

It took some time to come to a conclusion for me on this:

I'm going to rename it into „rebar-build-system“ (without the number). 
If need arises for some rebar4-build-system, we can still think about 
adding „rebar3-build-system” as an alias.

Rational:

I assume, some rebar2 and rebar4 build-systems would have the same 
phases. „Just” commands might be different. Eg. rebar2 did just 
„compile“ while rebar3 can have „as prod compile“ — which could be 
handled with different means.
Ludovic Courtès June 14, 2022, 9:29 p.m. UTC | #5
Hi Hartmut,

Maxime Devos <maximedevos@telenet.be> skribis:

> Ludovic Courtès schreef op vr 29-04-2022 om 15:18 [+0200]:
>> Hi,
>> 
>> Hartmut Goebel <h.goebel@crazy-compilers.com> skribis:
>> 
>> > Thanks to Maxime Devos for the review of V3. Do ease review for other
>> > reviewers, here is a complete set of updated patches, incorporating Maxime's
>> > comments.
>> 
>> Unless Maxime has further comments, this patch series looks ready to me,
>> modulo the cosmetic changes I suggested (some of which can be made
>> afterwards).
>
> No further comments.

This patch series was reviewed and approved a while back, please feel
free to push it!

There were a couple of suggestions (non-blockers) that you could
implement in subsequent patches.

Thanks,
Ludo’.
Hartmut Goebel June 15, 2022, 9:20 a.m. UTC | #6
Many thanks for the review. Finally I finished this patch series and 
pushed as 9cccf6490d98bd40ea1eb9e84ecf4a2b32614107

Notable changes compared to last review comments:

* removed guix extracting-download - which was an left-over

* build-system is now named rebar (without '3')

* fixed some minor lint-errors

I also validated that all packages are up to date.
Ludovic Courtès June 17, 2022, 3:25 p.m. UTC | #7
Hi,

Hartmut Goebel <h.goebel@crazy-compilers.com> skribis:

> Many thanks for the review. Finally I finished this patch series and
> pushed as 9cccf6490d98bd40ea1eb9e84ecf4a2b32614107

Yay, well done, thanks!

Ludo’.