From debbugs-submit-bounces@debbugs.gnu.org Sun Sep 27 17:46:31 2020 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: =?utf-8?Q?Ludovic_Court=C3=A8s?= To: 38100-done@debbugs.gnu.org Subject: Re: bug#38100: =?utf-8?Q?=E2=80=98--with-input=E2=80=99?= causes unintended rebuilds 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-Debbugs-Envelope-To: 38100-done X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -3.3 (---) 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.