From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mp1 ([2001:41d0:2:4a6f::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by ms11 with LMTPS id kNqVGGYIcV9vagAA0tVLHw (envelope-from ) for ; Sun, 27 Sep 2020 21:47:18 +0000 Received: from aspmx1.migadu.com ([2001:41d0:2:4a6f::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by mp1 with LMTPS id EJRbFGYIcV81ZAAAbx9fmQ (envelope-from ) for ; Sun, 27 Sep 2020 21:47:18 +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 C46BD940393 for ; Sun, 27 Sep 2020 21:47:17 +0000 (UTC) Received: from localhost ([::1]:45854 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1kMeVj-0002BA-Eo for larch@yhetil.org; Sun, 27 Sep 2020 17:47:11 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:58646) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1kMeVb-00028W-MJ for bug-guix@gnu.org; Sun, 27 Sep 2020 17:47:03 -0400 Received: from debbugs.gnu.org ([209.51.188.43]:39062) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1kMeVa-0005yW-9x for bug-guix@gnu.org; Sun, 27 Sep 2020 17:47:03 -0400 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1kMeVa-0000iU-8o for bug-guix@gnu.org; Sun, 27 Sep 2020 17:47:02 -0400 Subject: bug#38100: =?UTF-8?Q?=E2=80=98--with-input=E2=80=99?= causes unintended rebuilds In-Reply-To: <87eeyjsw3g.fsf@inria.fr> Resent-From: Ludovic =?UTF-8?Q?Court=C3=A8s?= Original-Sender: "Debbugs-submit" Resent-To: bug-guix@gnu.org Resent-Date: Sun, 27 Sep 2020 21:47:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: cc-closed 38100 X-GNU-PR-Package: guix X-GNU-PR-Keywords: To: 38100-done@debbugs.gnu.org Mail-Followup-To: 38100@debbugs.gnu.org, ludo@gnu.org, ludovic.courtes@inria.fr Received: via spool by 38100-done@debbugs.gnu.org id=D38100.16012431911270 (code D ref 38100); Sun, 27 Sep 2020 21:47:02 +0000 Received: (at 38100-done) by debbugs.gnu.org; 27 Sep 2020 21:46:31 +0000 Received: from localhost ([127.0.0.1]:50607 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1kMeV4-0000K0-VU for submit@debbugs.gnu.org; Sun, 27 Sep 2020 17:46:31 -0400 Received: from eggs.gnu.org ([209.51.188.92]:51698) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1kMeV3-0000EV-JO for 38100-done@debbugs.gnu.org; Sun, 27 Sep 2020 17:46:30 -0400 Received: from fencepost.gnu.org ([2001:470:142:3::e]:57749) by eggs.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1kMeUy-0005wN-9p for 38100-done@debbugs.gnu.org; Sun, 27 Sep 2020 17:46:24 -0400 Received: from [2a01:e0a:1d:7270:af76:b9b:ca24:c465] (port=43914 helo=ribbon) by fencepost.gnu.org with esmtpsa (TLS1.2:RSA_AES_256_CBC_SHA1:256) (Exim 4.82) (envelope-from ) id 1kMeUx-00062c-Tk for 38100-done@debbugs.gnu.org; Sun, 27 Sep 2020 17:46:24 -0400 From: Ludovic =?UTF-8?Q?Court=C3=A8s?= References: <87eeyjsw3g.fsf@inria.fr> <87ftiydqnb.fsf@gnu.org> Date: Sun, 27 Sep 2020 23:46:22 +0200 Message-ID: <87sgb2dhap.fsf@inria.fr> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/27.1 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable X-Spam-Score: -2.3 (--) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-Spam-Score: -3.3 (---) X-BeenThere: bug-guix@gnu.org List-Id: Bug reports for GNU Guix List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: bug-guix-bounces+larch=yhetil.org@gnu.org Sender: "bug-Guix" X-Scanner: scn0 Authentication-Results: aspmx1.migadu.com; dkim=none; dmarc=pass (policy=none) header.from=gnu.org; spf=pass (aspmx1.migadu.com: domain of bug-guix-bounces@gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=bug-guix-bounces@gnu.org X-Spam-Score: -1.51 X-TUID: Da/go1tW3UOE Hey there! Ludovic Court=C3=A8s skribis: > Ludovic Court=C3=A8s skribis: > >> Indeed, evaluating: >> >> (bag-transitive-inputs >> (package->bag ((package-input-rewriting '()) glib))) >> >> shows that we have two =E2=80=9Cpython=E2=80=9D packages there that are = not =E2=80=98eq?=E2=80=99. > > The problem is that =E2=80=98glib=E2=80=99 depends on =E2=80=98python-lib= xml2=E2=80=99, which uses > =E2=80=98python-build-system=E2=80=99 and thus has =E2=80=98python=E2=80= =99 as an implicit input. > > =E2=80=98package-input-rewriting=E2=80=99 doesn=E2=80=99t touch implicit = inputs so it leaves > that implicit =E2=80=98python=E2=80=99 untouched. > > Since =E2=80=98transitive-inputs=E2=80=99 (used by =E2=80=98bag-transitiv= e-inputs=E2=80=99) uses pointer > equality, we end up with two =E2=80=9Cpython=E2=80=9D packages that are n= ot =E2=80=98eq?=E2=80=99 but > are functionally equivalent: the one produced by > =E2=80=98package-input-rewriting=E2=80=99, and the implicit dependency of > =E2=80=98python-libxml2=E2=80=99. QED. > > (This is essentially the same as .) Good news, this is fixed by 2bf6f962b91123b0474c0f7123cd17efe7f09a66, which introduces package rewriting including implicit inputs! Before getting there, this issue did get on my nerves for a while. Here are several ways to address this issue that I thought of: 1. Have =E2=80=98package-input-rewriting/spec=E2=80=99 traverse implicit = inputs, at least optionally. We wouldn=E2=80=99t end up with an equivalent-but-not-eq? =E2=80=98python=E2=80=99 in the example above. = It does change the semantics though, and it may be nice to keep a =E2=80=9Csha= llow=E2=80=9D replacement option. That=E2=80=99s what 2bf6f962b91123b0474c0f7123cd17efe7f09a66 does. 2. Do (delete-duplicates input-drvs) in =E2=80=98bag->derivation=E2=80=99= . That seems wise, but it=E2=80=99s unfortunately impossible on =E2=80=98master=E2= =80=99 because of . 3. =E2=80=98package-input-rewriting/spec=E2=80=99 preserves eq?-ness for = packages not transformed; in the example above, the transformation result would be eq? to =E2=80=98glib=E2=80=99 because =E2=80=98--with-input=3Dlibre= office=3Dinkscape=E2=80=99 had no effect. Tricky to implement efficiently, perhaps not worth it. I think #2 might still be worth investigating, but it may have undesirable implications too. #3 is hardly doable. All in all, I=E2=80=99m glad that #1 addresses the issue, because it=E2=80= =99s also something we wanted anyway. Ludo=E2=80=99.