all messages for Guix-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: "Gábor Boskovits" <boskovits@gmail.com>
To: "Ludovic Courtès" <ludo@gnu.org>
Cc: Guix-devel <guix-devel@gnu.org>
Subject: Re: proposal: with-file-writeable
Date: Thu, 15 Feb 2018 08:25:33 +0100	[thread overview]
Message-ID: <CAE4v=pgYQGfSUjqNODdLDYcZhEE0s5E8SDprQ+6Nwn_45UODrg@mail.gmail.com> (raw)
In-Reply-To: <87wozfp2wk.fsf@gnu.org>

[-- Attachment #1: Type: text/plain, Size: 1758 bytes --]

2018-02-15 0:28 GMT+01:00 Ludovic Courtès <ludo@gnu.org>:

> Gábor Boskovits <boskovits@gmail.com> skribis:
>
> > the make-file-writeable function seems a bit too imperative to me, it
> would
> > look better if we could have a with-file-writeable function, so that we
> can
> > constrain the size effect, and more. Moreover if a file is read-only to
> > start with, it might be a good idea to keep it that way anyways. WDYT?
>
> Now that I found the function in (guix build utils) (thanks for guiding
> me!), I see what you mean.  ‘make-file-writable’ is imperative, true,
> but I’d say that file system operations are imperative in nature.
>
> A ‘with-file-writeable’ form would give a false sense of “containment” I
> think.  Contrary to what the name suggests, its effect would *not* be
> limited to the dynamic extent of its body, in the current thread;
> instead, the effect would be globally visible on the system.
>
> Last, the style of (guix build utils) is a lesser concern in a way
> because its primary use case is package builds.  All this code is
> “plumbing” and mostly imperative.
>
> So, all in all, I’d rather keep it this way.
>
> Thoughts?
>
>
Ok, the keep it this way. Another question, this came up, as
I was trying to find a nice solution to reset-gzip-timestamps failing.
I got different pieces of advice if I should reset the permissions after
resetting the timestamp, but I'm still not sure. It seems that the easiest
way to this would be to just add a call to make-file-writable to the phase
at the beginning, as we finally end up with a read-only one in the store
anyway. I feel that reseting the permissions is unneccesary additional
complexity. WDYT?


> Ludo’.
>

[-- Attachment #2: Type: text/html, Size: 2396 bytes --]

  reply	other threads:[~2018-02-15  7:25 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-02-10 21:50 proposal: with-file-writeable Gábor Boskovits
2018-02-14 13:51 ` Ludovic Courtès
2018-02-14 19:13   ` Leo Famulari
2018-02-14 19:38     ` Gábor Boskovits
2018-02-14 23:28 ` Ludovic Courtès
2018-02-15  7:25   ` Gábor Boskovits [this message]
2018-02-15 13:22     ` Ludovic Courtès
2018-02-15 13:53       ` Gábor Boskovits
2018-02-15 14:16     ` Marius Bakke
2018-02-16  6:35       ` Gábor Boskovits
2018-02-16  8:40       ` Ludovic Courtès

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to='CAE4v=pgYQGfSUjqNODdLDYcZhEE0s5E8SDprQ+6Nwn_45UODrg@mail.gmail.com' \
    --to=boskovits@gmail.com \
    --cc=guix-devel@gnu.org \
    --cc=ludo@gnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this external index

	https://git.savannah.gnu.org/cgit/guix.git

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.