unofficial mirror of guix-devel@gnu.org 
 help / color / mirror / code / Atom feed
From: "Ludovic Courtès" <ludo@gnu.org>
To: Tobias Geerinckx-Rice <me@tobias.gr>
Cc: guix-devel@gnu.org
Subject: Re: 01/01: services: Add SRFI-26 to Nix activation gexp.
Date: Thu, 13 Jun 2019 10:08:52 +0200	[thread overview]
Message-ID: <87pnnh7vqj.fsf@gnu.org> (raw)
In-Reply-To: <87ef3yeqh7.fsf@nckx> (Tobias Geerinckx-Rice's message of "Wed, 12 Jun 2019 18:08:20 +0200")

Hi Tobias,

Tobias Geerinckx-Rice <me@tobias.gr> skribis:

> Ludovic Courtès wrote:
>> (srfi srfi-26) must not be added to the imported modules: it would
>> import it from the host Guile, but the host Guile version may differ
>> between users
>
> I looked at ‘G-Expressions’ in the manual before but I didn't see this
> documented.  Did I miss it, or is this tribal knowledge?

I’m afraid it’s tribal knowledge.  ;-)

> Assuming there's at least a probably-good and definitely-bad set of
> modules that should(n't) be imported this way: can we at least print a
> warning when a non-(guix) module is listed, or whatever the rule would
> be?

Should we print a warning?  I don’t know.  ‘with-imported-modules’ does
what it says: it imports modules from the host side into the build side.
Usually, it’s “wrong” to import modules that ship with Guile, but there
might be cases where you want to do it.

So I’m not sure a warning is the right thing, but I’m open to
suggestions!

>> , and thus the resulting derivation would also differ.
>
> Just to make sure I follow, it's obviously wrong it both cases: this
> would only be exposed if Guile's CUT suddenly changed its *behaviour*
> in a visible (and likely very unintentional) way, right?  Or does
> with-imported-modules pull in (and hash) the actual object code
> (/closure)?

‘with-imported-modules’ takes the srfi-26.scm file that you have in your
%load-path, and makes it an input of the derivation.

Between Guile 2.2.4 and Guile 2.2.5, the API is undoubtedly the same,
but the file itself could be slightly different (for example, copyright
years in the header might have changed.)  Thus, if I run 2.2.5 and you
run 2.2.4, we’d be getting different derivations, simply because our
copy of srfi-26.scm differs.

>> The right thing is to just (use-modules (srfi srfi-26)), which has
>> the
>> effect of using that module from the Guile being used for builds.
>>
>> Could you adjust it accordingly?
>
> Please take a second to check whether 79d19d7d does what you meant.

It does, thank you!

Ludo’.

  reply	other threads:[~2019-06-13  8:08 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <20190611191005.14930.97243@vcs0.savannah.gnu.org>
     [not found] ` <20190611191006.B2385204DB@vcs0.savannah.gnu.org>
2019-06-12 12:06   ` 01/01: services: Add SRFI-26 to Nix activation gexp Ludovic Courtès
2019-06-12 16:08     ` Tobias Geerinckx-Rice
2019-06-13  8:08       ` Ludovic Courtès [this message]
2019-06-12 17:32   ` Mark H Weaver
2019-06-12 17:54     ` Tobias Geerinckx-Rice

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

  List information: https://guix.gnu.org/

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

  git send-email \
    --in-reply-to=87pnnh7vqj.fsf@gnu.org \
    --to=ludo@gnu.org \
    --cc=guix-devel@gnu.org \
    --cc=me@tobias.gr \
    /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 public inbox

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

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).