From mboxrd@z Thu Jan 1 00:00:00 1970 From: Steven Allen Subject: Re: Design decision behind inputs/native-inputs/propagated-inputs Date: Sat, 23 Jan 2016 17:55:17 -0500 Message-ID: <20160123225517.GA3442@stebalien.com> References: <877fj32qxy.fsf@gnu.org> <20160121160811.GA1596@stebalien.com> <56A150DD.1060207@uq.edu.au> <20160121221340.GA6151@stebalien.com> <56A15FC4.2060501@uq.edu.au> <20160121231935.GA26221@stebalien.com> <56A17055.5090005@uq.edu.au> <20160122013025.GA729@stebalien.com> <20160123165932.GA27048@stebalien.com> <87wpr0t2xx.fsf@gnu.org> Mime-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha256; protocol="application/pgp-signature"; boundary="Q68bSM7Ycu6FN28Q" Return-path: Received: from eggs.gnu.org ([2001:4830:134:3::10]:37752) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1aN75W-0006yR-8V for help-guix@gnu.org; Sat, 23 Jan 2016 17:55:23 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1aN75V-0002mQ-AW for help-guix@gnu.org; Sat, 23 Jan 2016 17:55:22 -0500 Content-Disposition: inline In-Reply-To: <87wpr0t2xx.fsf@gnu.org> List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: help-guix-bounces+gcggh-help-guix=m.gmane.org@gnu.org Sender: help-guix-bounces+gcggh-help-guix=m.gmane.org@gnu.org To: Ludovic =?iso-8859-1?Q?Court=E8s?= Cc: help-guix@gnu.org --Q68bSM7Ycu6FN28Q Content-Type: text/plain; charset=utf-8 Content-Disposition: inline Content-Transfer-Encoding: quoted-printable Ludovic, On 01-23-16, Ludovic Court=C3=A8s wrote: > At the end of a build, guix-daemon scans all the produced file in search > of references to other store items. It then records those run-time > references (so a subset of the build-time dependencies) in the > /var/guix/db/db.sqlite database, which can be queried with > =E2=80=98guix gc --references=E2=80=99. So Guix does auto detect which inputs are needed at runtime! Back to my original question: why? I've read the relevant parts of the thesis (2.1, 3.3, 7.1.5) and none of them actually answer this question. The thesis answers "why is this not a horrible idea?" with "it appears to work in practice" (2.1, 7.1.5) which: 1. Isn't very satisfying. 2. Is wrong. It works in practice until some unexpected case comes up (e.g. python eggs) and the package manager itself has to be changed. 3. Doesn't actually motivate this feature. The only motivation I can think of is that it makes packaging (1) easier (2) less error prone. You don't have to care about what inputs are needed at runtime, you just have to write down all inputs and the package manager will detect which ones are needed at runtime for you. However, this Guix can't fully take advantage of this because it needs to support cross compilation. Therefore, all *platform-dependent* inputs needed at build time need to be specially designated. My proposal is to: 1. Keep everything in the inputs list at runtime (write this list down somewhere). 2. Move all build-only inputs into native-inputs. 3. Turn this auto detection into a lint that validates the inputs list (verify that the inputs list isn't *missing* an input). 4. Optionally rename native-inputs to build-inputs. Motivation: 1. One can tell which inputs will be kept at runtime and which will not by looking at the package definition. 2. One can package any program without ever having to modify the build system or play games (e.g. decompress random files). 3. It's less error prone because it's explicit. Unlike the current system, it won't break if some file happens to be compressed or encoded in some unexpected format. And my question is: are there any use cases that this doesn't support? Sorry for the wall of text and thanks for the thesis/explanation! --=20 Steven Allen ((Do Not Email )) --Q68bSM7Ycu6FN28Q Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- Version: GnuPG v2 iQIcBAEBCAAGBQJWpATQAAoJEGVqlrqQ0li+M60P/1PxC2YjyX0t8a/Y6lx6LC1B 0Lgt9VPCCFbqn1diXU4R0HV3bPYTw0xm/IG2ZSq5FiEpPyq4rwsQQWlywii0Z96T u85ObRPnPNNREBFCXon90dw1ICHd0DpZhW2FxS27zLyMUxqkw30R2QnlyWvkkmWw rqn4yX8E/7L3knOonuGPI6YyISMoaEZ2L5IN7QmtRuTumKn2BQ3W7PHkKBsjeXPY AOXzGJQLqBidhxMeZUM1TQ6C8ZU27ZYu0IasNDNQa/dS6cgXQWsa9MO/Fy9rPdVc ab3E/smBZKuknkP+WWYNZmImbW6t3/porPNLNBJpEuy08EP0c/IoMPmHlBiMAgCy QFnJ2uDSuioiw1gGCe9g4BgDPlxmD3+IA4JC99JrQ/TdYgJ7NeU6jA+iwQUKKkIf DnA4IJ9HDt6SmVHwcJn1iEvdMuaHE8mXceBl087RSNonp0N6JQdkMygsTwmKB8VN lIoQ71GVstWY3FG2ALnAiECbuaH0AJmd1vPD9C1wYzprBGUwpNi6Fv/ceromOEO+ 1XWeubHzQFASlyHY7Dl3nQxA0hFjnOHb4P6FmmRFKoCupPafAzSiNBFbR1MHrgj6 0b0/1JAkUxvhMUTpMmW6nPCAMaz3vqHC7e3MS7CvWcnVJAm4auHFESqSZmKEsEaO c8XEhieGAAxft75/2Hk5 =WXRv -----END PGP SIGNATURE----- --Q68bSM7Ycu6FN28Q--