GNU bug report logs - #68504
[PATCH] Add copy-on-write support to scm_copy_file.

Previous Next

Package: guile;

Reported by: Tomas Volf <~@wolfsden.cz>

Date: Tue, 16 Jan 2024 12:49: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


View this message in rfc822 format

From: Tomas Volf <~@wolfsden.cz>
To: Ludovic Courtès <ludo <at> gnu.org>
Cc: 68504 <at> debbugs.gnu.org
Subject: bug#68504: [PATCH] Add copy-on-write support to scm_copy_file.
Date: Wed, 24 Jan 2024 20:19:51 +0100
[Message part 1 (text/plain, inline)]
On 2024-01-24 11:26:56 +0100, Ludovic Courtès wrote:
>
> The patch looks great (and very useful) to me, modulo one issue:
>
> > -SCM_API SCM scm_copy_file (SCM oldfile, SCM newfile);
> > +SCM_API SCM scm_copy_file (SCM oldfile, SCM newfile, SCM rest);
>
> Since this is a public interface, we cannot change this function’s
> signature during the 3.0 stable series.
>
> Thus, I would suggest keeping the public ‘scm_copy_file’ unchanged and
> internally having a three-argument variant.  The Scheme-level
> ‘copy-file’ would map to that three-argument variant.  (See how
> ‘scm_pipe’ and ‘scm accept’ as examples.)

That is a very good point, which I did not realize at all.  Thanks to the
examples you provided, it was not that hard to do (well, assuming I did it
right).

> Could you send an updated patch?

Done.  However now that I read it after myself, I overlooked this occurrence of
scm_copy_file in the commit message:

    This commit adds support for this feature into our
    copy-file (scm_copy_file) procedure.  Same as `cp', it defaults to

So I just sent v3 right after v2, sorry for the noise, should have been more
careful.

>
> BTW, copyright assignment to the FSF is now optional but encouraged.
> Please see
> <https://lists.gnu.org/archive/html/guile-devel/2022-10/msg00008.html>.

Since it is optional, I will currently opt into not doing the assignment, I do
not like the concept that much.  I will try to find time to actually form an
opinion based on facts.

Have a nice day,
Tomas

--
There are only two hard things in Computer Science:
cache invalidation, naming things and off-by-one errors.
[signature.asc (application/pgp-signature, inline)]

This bug report was last modified 1 year and 117 days ago.

Previous Next


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