From mboxrd@z Thu Jan 1 00:00:00 1970 From: =?utf-8?Q?Ludovic_Court=C3=A8s?= Subject: Re: 01/01: services: Add SRFI-26 to Nix activation gexp. Date: Thu, 13 Jun 2019 10:08:52 +0200 Message-ID: <87pnnh7vqj.fsf@gnu.org> References: <20190611191005.14930.97243@vcs0.savannah.gnu.org> <20190611191006.B2385204DB@vcs0.savannah.gnu.org> <87pnnjxb2i.fsf@gnu.org> <87ef3yeqh7.fsf@nckx> Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Return-path: Received: from eggs.gnu.org ([2001:470:142:3::10]:60704) by lists.gnu.org with esmtp (Exim 4.86_2) (envelope-from ) id 1hbKn2-0007vv-LZ for guix-devel@gnu.org; Thu, 13 Jun 2019 04:08:57 -0400 In-Reply-To: <87ef3yeqh7.fsf@nckx> (Tobias Geerinckx-Rice's message of "Wed, 12 Jun 2019 18:08:20 +0200") List-Id: "Development of GNU Guix and the GNU System distribution." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: guix-devel-bounces+gcggd-guix-devel=m.gmane.org@gnu.org Sender: "Guix-devel" To: Tobias Geerinckx-Rice Cc: guix-devel@gnu.org Hi Tobias, Tobias Geerinckx-Rice skribis: > Ludovic Court=C3=A8s 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 =E2=80=98G-Expressions=E2=80=99 in the manual before but I di= dn't see this > documented. Did I miss it, or is this tribal knowledge? I=E2=80=99m afraid it=E2=80=99s 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=E2=80=99t know. =E2=80=98with-imported-m= odules=E2=80=99 does what it says: it imports modules from the host side into the build side. Usually, it=E2=80=99s =E2=80=9Cwrong=E2=80=9D to import modules that ship w= ith Guile, but there might be cases where you want to do it. So I=E2=80=99m not sure a warning is the right thing, but I=E2=80=99m 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)? =E2=80=98with-imported-modules=E2=80=99 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=E2=80=99d 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=E2=80=99.