From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mp0 ([2001:41d0:2:4a6f::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by ms11 with LMTPS id iE5QMwnfLV9fNwAA0tVLHw (envelope-from ) for ; Fri, 07 Aug 2020 23:08:57 +0000 Received: from aspmx1.migadu.com ([2001:41d0:2:4a6f::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by mp0 with LMTPS id wHcvLwnfLV+YQAAA1q6Kng (envelope-from ) for ; Fri, 07 Aug 2020 23:08:57 +0000 Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by aspmx1.migadu.com (Postfix) with ESMTPS id 6AFAA9404D9 for ; Fri, 7 Aug 2020 23:08:57 +0000 (UTC) Received: from localhost ([::1]:51190 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1k4BTs-0000rY-51 for larch@yhetil.org; Fri, 07 Aug 2020 19:08:56 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:58626) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1k4BTi-0000rP-8H for guix-devel@gnu.org; Fri, 07 Aug 2020 19:08:46 -0400 Received: from pat.zlotemysli.pl ([37.59.186.212]:34660) by eggs.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1k4BTg-0004Mm-7D for guix-devel@gnu.org; Fri, 07 Aug 2020 19:08:46 -0400 Received: (qmail 26083 invoked by uid 1009); 8 Aug 2020 01:08:41 +0200 Received: from 188.123.215.55 (kuba@kadziolka.net@188.123.215.55) by pat.zlotemysli.pl (envelope-from , uid 1002) with qmail-scanner-2.08st (clamdscan: 0.98.6/25896. spamassassin: 3.4.0. perlscan: 2.08st. Clear:RC:1(188.123.215.55):. Processed in 0.048054 secs); 07 Aug 2020 23:08:41 -0000 Received: from unknown (HELO gravity) (kuba@kadziolka.net@188.123.215.55) by pat.zlotemysli.pl with SMTP; 8 Aug 2020 01:08:41 +0200 Date: Sat, 8 Aug 2020 01:08:39 +0200 From: Jakub =?utf-8?B?S8SFZHppb8WCa2E=?= To: guix-devel@gnu.org Subject: Why does %build-inputs contain the transitive closure of inputs?! Message-ID: <20200807230839.n4zussxemc2sxcp3@gravity> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha256; protocol="application/pgp-signature"; boundary="b3pwj3zcrzqm4t3f" Content-Disposition: inline Received-SPF: none client-ip=37.59.186.212; envelope-from=kuba@kadziolka.net; helo=pat.zlotemysli.pl X-detected-operating-system: by eggs.gnu.org: First seen = 2020/08/07 18:14:45 X-ACL-Warn: Detected OS = Linux 3.11 and newer X-Spam_score_int: -17 X-Spam_score: -1.8 X-Spam_bar: - X-Spam_report: (-1.8 / 5.0 requ) BAYES_00=-1.9, PLING_QUERY=0.1, SPF_HELO_PASS=-0.001, SPF_NONE=0.001 autolearn=no autolearn_force=no X-Spam_action: no action X-BeenThere: guix-devel@gnu.org X-Mailman-Version: 2.1.23 Precedence: list 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+larch=yhetil.org@gnu.org Sender: "Guix-devel" X-Scanner: scn0 Authentication-Results: aspmx1.migadu.com; dkim=none; dmarc=none; spf=pass (aspmx1.migadu.com: domain of guix-devel-bounces@gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=guix-devel-bounces@gnu.org X-Spam-Score: -2.61 X-TUID: U7BpAtrLy9NC --b3pwj3zcrzqm4t3f Content-Type: text/plain; charset=utf-8 Content-Disposition: inline Content-Transfer-Encoding: quoted-printable Consider this package: (use-modules (guix packages) (guix build-system trivial) (gnu packages version-control)) (define foo (package (name "foo") (version "0") (source #f) (build-system trivial-build-system) (arguments `(#:builder (begin (display %build-inputs) #t))) (inputs `(("libgit2" ,libgit2))) (synopsis "") (description "") (home-page "") (license #f))) When we try building it, it prints: ((libgit2 . /gnu/store/hlcfmg5n29ynf354x7s4s7bkxswrmkq4-libgit2-1.0.1) (zli= b . /gnu/store/rykm237xkmq7rl1p0nwass01p090p88x-zlib-1.2.11) (pcre2 . /gnu/= store/ckpchpflfwhag5qsfk8klvmihwzqg9rp-pcre2-10.35) (openssl . /gnu/store/d= kzivzn17qilmqdfpyps62b395wxhshh-openssl-1.1.1f)) Why? I would expect only libgit2 to be present, and not all of its dependencies. It seems to me that this has only downsides - the entire transitive closure needs to be present during build, even when the actually used dependencies don't reference it, and the names of inputs used by packages are now public API, and changing them can break the build of any transitively dependent package. I've traced this back to bag->derivation's use of bag-transitive-inputs, but unfortunately git blame didn't hold any hints - it has been this way ever since bag->derivation was first implemented. Am I missing something, or is this a bug? Regards, Jakub K=C4=85dzio=C5=82ka --b3pwj3zcrzqm4t3f Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- iQIzBAABCAAdFiEE5Xa/ss9usT31cTO54xWnWEYTFWQFAl8t3vcACgkQ4xWnWEYT FWSCBxAAjT8tbJXKN1a0Ieg7lAKdv7EQi8mXSAiQOXJQw/dFUfgEgrmT87g2AQCw rIhapsIQ+rUahWGijgg5f9gCUPFVVMELUfyf1rCviCJ2CMFhx1KWb9YD+1JTGK70 tKmKCgbkkpP3o+PY4DUwnv+4gOCkbA3Ftqebfyld/yIXRnAE+FX0klDRD9XPdh5+ 6Lpha7ssDCxEJREctrjSuRvbKj2S5+TuliorwFKyqBN++yFjtYHlZ514crejwQHh pp0jBzq241jDKMjsYGQL+2S8oVVw8ecvqMI3E0dJZZqzFAh++qbgdNCUfvu1gV2u A5CoqDKSeVGRm7Vg2dExV5aBWEzxf+9EIdWnxZAvz/vJKRP8zU2iur9bwXaVUfdJ cm2a4oLXaI/Df5VE9R/ujTP9vUU2Llxap/LBStahgPvW5yJvxaO1VqJJQ1i/qKTh 5jM1/tD8/gDkKNWFprBxmJdnxzqeV87+qfm6q0H47cw0akshqeEj7GQYzjwNT6qf QFuaLr7jtG+zcm03u4cWx+gqz4ZoaNsIfePaddL5xZME3X/u0mWdn5S1sp9QtEwo ftE+Yao8ptJqBOQKkk7haSXIq/VSyU61OkXndrAH8Ojz9DiwRja+WqTiwz2HIIzR uRwjAHY6JmK/oTr3jWqt19ekvi6L1FvClcyGOlfrR+UAGPIftvM= =YX98 -----END PGP SIGNATURE----- --b3pwj3zcrzqm4t3f--