Subject: [bug#44130] [PATCH] Add a recursive version of mkdir-p

From: Leo Prikler <[email-masked]>
Date: Fri, 23 Oct 2020 22:01:33 +0200

> Le vendredi 23 octobre 2020 à 18:37 +0200, Ludovic Courtès a écrit :
> > 
> > What I was questioning is the temptation to make one-function
> > packages
> > as is common for instance in npm.
> 
> Ah, so I can summarize. My solutions are:
> 
> 1. Guile provides mkdir-p: Perfect!
> 2. I put the function in a package: not great, but acceptable.
> 3. I depend on gash: not acceptable, there's only mkdir-p that's
> interesting, the rest is for advanced system tools.
> 4. I copy that function around: not acceptable.
5. You depend on any other package, that provides mkdir-p among other
utilities big enough to be packaged in Guix: Not acceptable.
6. You depend on any other package, that provides just mkdir-p with
maybe a few other utilities, that make Guix devs question whether this
will become the next npm.
7. You write a module, that evals untrusted code from the internet and
point it towards your implementation of mkdir-p.
8. You find existing implementations of mkdir-p insufficient and roll
yet another mkdir-p.
9. You write an accelerated mkdir-p in native code as a shared library.
10. You combine 7 and 9.
...

For what it's worth, I've been hacking on a slightly more complete set
of filesystem utilities over at [1] for the past few days.  It is not
yet complete to the point that I'd consider its inclusion into Guix
upstream, but you might want to try it out and perhaps contribute if
that fits your niche.

> So, there's no temptation to make one-function packages.
> 
> Should I understand that you question the integration of one-function
> packages into guix? If you don't want it in guix, then it's fine, I
> can
> just use it only for myself, I have my own channel. In which case,
> please just say so, so we can all move on to more interesting things.
In that case, you still recreate npm, just with an additional layer of
indirection.  Obviously Guix developers can not stop you from doing so,
only advise you not to.

Regards, Leo

[1] https://gitlab.com/leoprikler/guile-filesystem