Subject: [bug#66801] [PATCH va3e5ae0f..37252e07 01/32] rebar-build-system and packages.

From: Pierre-Henry Fröhring <[email-masked]>
Date: Sun, 29 Oct 2023 23:14:47 +0100

>  The middle should indicate a revision number and an optional branch
>  (as well as optional WIP and RFC).  Since this goes to master (I
>  assume), it should just be v2, v3, … vN.

DONE: Ok. If I understood correctly, it means that it should have been
[PATCH v2]. So this time, it will be [PATCH v3].

> Emacs, Rust, etc., build systems just strip out the prefix.  No need
> to go all fancy regexpy :)何で？

WAITING: Well, it makes the warning message completely explicit, for
example:
┌────
│ AssertionWarning 4dcbff27
│   Assertion: re matches name.
│     re = ^erlang-(.*)
│     name = something-else
└────
Is it OK if it stays like this?

> I suggest not renaming these procedures.  default-X reads more
> naturally than X-default.

DONE.

> This reeks of the hack that we need for cargo-build-system, except
> with a worse variable name.  I strongly suggest looking into ways we
> can do without it.

WAITING: this idea came from a discussion with jpoiret. See:
<https://logs.guix.gnu.org/guix/2023-10-24.log#180111>. It seems that
the idea you suggest is to use `search-path-as-list' as hinted below. Is
this correct?

> Uhm, did you mean file-name-separator-string from Guile core?

DONE: Great. That is what I was searching for; I'm not yet familiar with
the standard library.

> We have find-files?

DONE: replaced.

> Uhm, how are you improving the status quo here?

WAITING: comment updated with:
┌────
│ ;;   If these directories exist, then no error occurs. So, we make sure
│ ;;   they exist.
└────
Is this OK?

> The canonical way is to use (getcwd) as HOME.  You could also try
> something like (canonicalize-path "../hexpm-home").  Anyhow, you might
> want to try using a variable that is less global than HOME.

DONE: HOME has been replaced by REBAR_CACHE_DIR.

> I suggest not using French examples – they are confusing between
> French and German native speakers :)

DONE: « → “, » → ”

> You might want to look into possible PATH variables or put these
> sources into a special folder so that you can use search-path-as-list.

WAITING: Perhaps an idea:
1) If we require all Erlang packages to have an output “src” something
   like: /gnu/store/…elixir-pkg-1.2.3/src/elixir/src/…,
2) then (search-path-as-list '("src/elixir/src")
   '("/gnu/store…elixir-pkg-1.2.3" …)) would return
   '("/gnu/store…elixir-pkg-1.2.3/src/elixir/src" …) ≡ lst-src.
3) Given lst-src, it would be enough to install each source under
   _checkouts, i.e., _checkouts/lib-name/src. It is probably feasible to
   retrieve lib-name from somewhere.
What do you think?

> Also, IIUC, erlang-depends already does something rather similar.  Is
> there any reason it's broken for you?

WAITING: Without that (i.e., _checkouts/lib-name/src), rebar3 will not
compile things. Is this a satisfaying explaination?