GNU bug report logs - #44130
[PATCH] Add a recursive version of mkdir-p

Previous Next

Package: guix-patches;

Reported by: divoplade <d <at> divoplade.fr>

Date: Wed, 21 Oct 2020 23:31:02 UTC

Severity: normal

Tags: patch

Done: Ludovic Courtès <ludo <at> gnu.org>

Bug is archived. No further changes may be made.

Full log


Message #8 received at 44130 <at> debbugs.gnu.org (full text, mbox):

From: Ludovic Courtès <ludo <at> gnu.org>
To: divoplade <d <at> divoplade.fr>
Cc: 44130 <at> debbugs.gnu.org
Subject: Re: [bug#44130] [PATCH] Add a recursive version of mkdir-p
Date: Fri, 23 Oct 2020 15:12:44 +0200
Hi!

divoplade <d <at> divoplade.fr> skribis:

> I need this mkdir-p function in any non-trivial program I write. I had
> 3 bad choices:
>
> 1. Lobby guile to provide this function out of the box (this will take
> time);
> 2. Copy that of guix, or gash, or any other: this does not seem
> acceptable to me, because this function will surely evolve (for
> instance, if guile gets suport for mingw and we start running guile
> programs on windows) and I don't want to update more than one version
> of this function;
> 3. Depend on guix, gash or another package: this would be too large a
> dependency for my programs.
>
> So I wrote it in its own package and I intend to depend on it for my
> other projects. It would be best if you could accept this package in
> guix proper.
>
> What do you think?

I have nothing against adding this package to Guix, but…

Do you realize that the package definition is longer than the ‘mkdir-p’
procedure itself?  :-)

I think npm packages are too fine-grain; I don’t think this is the
approach to follow for Guile.

It’s likely that packages that need ‘mkdir-p’ also need other high-level
file system operations that Gash (say) provides.  In that case, I’d
encourage people to depend on Gash.  If Gash is too big a dependency for
the project, including its own copy of this 24-line procedure is
probably acceptable.

All that said, I do think that Guile itself should eventually include
some of the utilities found in (guix build utils) or Gash.  For
instance, it recently got a new ‘pipeline’ procedure, which comes from
Gash, and I think it’s a great addition.  This is the way to go in the
longer term.

Thoughts?

Ludo’.




This bug report was last modified 4 years and 265 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.