From mboxrd@z Thu Jan 1 00:00:00 1970 From: Ludovic =?UTF-8?Q?Court=C3=A8s?= Subject: bug#34574: Confusing manual entry for gexp->file Date: Fri, 08 Mar 2019 11:48:34 +0100 Message-ID: <87r2bhhcal.fsf@gnu.org> References: <20190219162120.7evs2ynhhdksyq2d@pelzflorian.localdomain> <871s3kjg5e.fsf@gnu.org> <20190306183519.ws5hrx66ex4xa4d7@pelzflorian.localdomain> Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="=-=-=" Return-path: Received: from eggs.gnu.org ([209.51.188.92]:58664) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1h2D3o-0006SO-Lb for bug-guix@gnu.org; Fri, 08 Mar 2019 05:49:05 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1h2D3n-0001jo-PI for bug-guix@gnu.org; Fri, 08 Mar 2019 05:49:04 -0500 Received: from debbugs.gnu.org ([209.51.188.43]:50563) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1h2D3n-0001jd-LL for bug-guix@gnu.org; Fri, 08 Mar 2019 05:49:03 -0500 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1h2D3m-0007FJ-2a for bug-guix@gnu.org; Fri, 08 Mar 2019 05:49:03 -0500 Sender: "Debbugs-submit" Resent-To: bug-guix@gnu.org Resent-Message-ID: In-Reply-To: <20190306183519.ws5hrx66ex4xa4d7@pelzflorian.localdomain> (pelzflorian's message of "Wed, 6 Mar 2019 19:35:19 +0100") List-Id: Bug reports for GNU Guix List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: bug-guix-bounces+gcggb-bug-guix=m.gmane.org@gnu.org Sender: "bug-Guix" To: "pelzflorian (Florian Pelz)" Cc: 34574-done@debbugs.gnu.org --=-=-= Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Hi Florian, "pelzflorian (Florian Pelz)" skribis: > On Wed, Mar 06, 2019 at 02:17:49PM +0100, Ludovic Court=C3=A8s wrote: >> Hi Florian, >>=20 >> "pelzflorian (Florian Pelz)" skribis: >>=20 >> > The Guix manual contains the following description of gexp->file: >> > >> > -- Monadic Procedure: gexp->file NAME EXP [#:set-load-path? #t] >> > [#:module-path %load-path] [#:splice? #f] [#:guile >> > (default-guile)] Return a derivation that builds a file NAME >> > containing EXP. When SPLICE? is true, EXP is considered to be a >> > list of expressions that will be spliced in the resulting file. >> > >> > When SET-LOAD-PATH? is true, emit code in the resulting file to s= et >> > =E2=80=98%load-path=E2=80=99 and =E2=80=98%load-compiled-path=E2= =80=99 to honor EXP=E2=80=99s imported >> > modules. Look up EXP=E2=80=99s modules in MODULE-PATH. >> > >> > The resulting file holds references to all the dependencies of EXP >> > or a subset thereof. >> > >> > I do not understand this last sentence. How can it be a subset? A >> > subset of what? Can this be explained more clearly or removed? >>=20 >> It can be a subset of the references of EXP because, when a build >> completes, the daemon scan the output(s) to determine the set of >> residual references. That=E2=80=99s the difference between build-time a= nd >> run-time dependencies. >>=20 >> For instance, =E2=80=98sed=E2=80=99 depends on =E2=80=98gcc=E2=80=99 and= =E2=80=98gcc:lib=E2=80=99 at build time, but >> its output depends only on =E2=80=98gcc:lib=E2=80=99. >>=20 >> Does that make sense? >>=20 >> Ludo=E2=80=99. > > Thank you. I did not know this is how the daemon determines outputs=E2= =80=99 > references. In this case I would understand the manual more easily if > it said: > > The output(s) resulting from this derivation will be scanned for > references by the daemon. They can hold references to all the > dependencies of EXP or a subset thereof. > > Please make this more clear in the manual. The explanation isn=E2=80=99t specific to =E2=80=98gexp->file=E2=80=99 so I= =E2=80=99ve added the following text under =E2=80=9CDerivations=E2=80=9D. Thanks, Ludo=E2=80=99. --=-=-= Content-Type: text/x-patch Content-Disposition: inline modified doc/guix.texi @@ -6238,8 +6238,11 @@ The outputs of the derivation---derivations produce at least one file or directory in the store, but may produce more. @item -The inputs of the derivations, which may be other derivations or plain -files in the store (patches, build scripts, etc.) +@cindex build-time dependencies +@cindex dependencies, build-time +The inputs of the derivations---i.e., its build-time dependencies---which may +be other derivations or plain files in the store (patches, build scripts, +etc.) @item The system type targeted by the derivation---e.g., @code{x86_64-linux}. @@ -6270,6 +6273,16 @@ of a fixed-output derivation are independent of its inputs---e.g., a source code download produces the same result regardless of the download method and tools being used. +@cindex references +@cindex run-time dependencies +@cindex dependencies, run-time +The outputs of derivations---i.e., the build results---have a set of +@dfn{references}, as reported by the @code{references} RPC or the +@command{guix gc --references} command (@pxref{Invoking guix gc}). References +are the set of run-time dependencies of the build results. References are a +subset of the inputs of the derivation; this subset is automatically computed +by the build daemon by scanning all the files in the outputs. + The @code{(guix derivations)} module provides a representation of derivations as Scheme objects, along with procedures to create and otherwise manipulate derivations. The lowest-level primitive to create --=-=-=--