X-Loop: help-debbugs@HIDDEN Subject: bug#50335: Inheritance vs. =?UTF-8?Q?=E2=80=98this-package=E2=80=99?= Resent-From: Ludovic =?UTF-8?Q?Court=C3=A8s?= <ludovic.courtes@HIDDEN> Original-Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org> Resent-CC: philippe.swartvagher@HIDDEN, bug-guix@HIDDEN Resent-Date: Thu, 02 Sep 2021 13:49:02 +0000 Resent-Message-ID: <handler.50335.B.163059052110907 <at> debbugs.gnu.org> Resent-Sender: help-debbugs@HIDDEN X-GNU-PR-Message: report 50335 X-GNU-PR-Package: guix X-GNU-PR-Keywords: To: 50335 <at> debbugs.gnu.org Cc: philippe.swartvagher@HIDDEN X-Debbugs-Original-To: bug-guix@HIDDEN X-Debbugs-Original-Xcc: philippe.swartvagher@HIDDEN Received: via spool by submit <at> debbugs.gnu.org id=B.163059052110907 (code B ref -1); Thu, 02 Sep 2021 13:49:02 +0000 Received: (at submit) by debbugs.gnu.org; 2 Sep 2021 13:48:41 +0000 Received: from localhost ([127.0.0.1]:40048 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>) id 1mLn56-0002pr-Tg for submit <at> debbugs.gnu.org; Thu, 02 Sep 2021 09:48:41 -0400 Received: from lists.gnu.org ([209.51.188.17]:45814) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from <ludovic.courtes@HIDDEN>) id 1mLn52-0002ph-5s for submit <at> debbugs.gnu.org; Thu, 02 Sep 2021 09:48:39 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:51628) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from <ludovic.courtes@HIDDEN>) id 1mLn51-0000uX-U4 for bug-guix@HIDDEN; Thu, 02 Sep 2021 09:48:35 -0400 Received: from mail2-relais-roc.national.inria.fr ([192.134.164.83]:41703) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from <ludovic.courtes@HIDDEN>) id 1mLn4z-0000qn-FL for bug-guix@HIDDEN; Thu, 02 Sep 2021 09:48:35 -0400 IronPort-HdrOrdr: A9a23:9iZwCK+TPGnC/0YchVZuk+DFI+orL9Y04lQ7vn2ZKCYlEfBw+Pre+cjzuSWbtN9zYhEdcK67Scu9qBrnnPYfi7X5W43CYOCMggeVxe9ZgLcKuweOJxHD X-IronPort-AV: E=Sophos;i="5.84,326,1620684000"; d="scan'208";a="526402077" Received: from unknown (HELO ribbon) ([193.50.110.141]) by mail2-relais-roc.national.inria.fr with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 02 Sep 2021 15:48:27 +0200 From: Ludovic =?UTF-8?Q?Court=C3=A8s?= <ludovic.courtes@HIDDEN> X-URL: http://www.fdn.fr/~lcourtes/ X-Revolutionary-Date: 16 Fructidor an 229 de la =?UTF-8?Q?R=C3=A9volution?= X-PGP-Key-ID: 0x090B11993D9AEBB5 X-PGP-Key: http://www.fdn.fr/~lcourtes/ludovic.asc X-PGP-Fingerprint: 3CE4 6455 8A84 FDC6 9DB4 0CFB 090B 1199 3D9A EBB5 X-OS: x86_64-pc-linux-gnu Date: Thu, 02 Sep 2021 15:48:27 +0200 Message-ID: <87r1e73x78.fsf@HIDDEN> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/27.2 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Received-SPF: pass client-ip=192.134.164.83; envelope-from=ludovic.courtes@HIDDEN; helo=mail2-relais-roc.national.inria.fr X-Spam_score_int: -41 X-Spam_score: -4.2 X-Spam_bar: ---- X-Spam_report: (-4.2 / 5.0 requ) BAYES_00=-1.9, RCVD_IN_DNSWL_MED=-2.3, RCVD_IN_MSPIKE_H2=-0.001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-Spam-Score: -1.3 (-) X-BeenThere: debbugs-submit <at> debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: <debbugs-submit.debbugs.gnu.org> List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe> List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/> List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org> List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help> List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe> Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org> X-Spam-Score: -2.3 (--) Hi! We stumbled upon an idiom for package arguments that, combined with package inheritance, would not work as expected. It goes like this (taken from <https://gitlab.inria.fr/guix-hpc/guix-hpc/>): --8<---------------cut here---------------start------------->8--- (define-public starpu (package ;; =E2=80=A6 (arguments (substitute-keyword-arguments (package-arguments starpu-1.2) ((#:configure-flags flags '()) (match (assoc "mpi" (package-propagated-inputs this-package)) (("mpi" mpi) (if (string=3D? (package-name mpi) "nmad") `(cons "--enable-nmad" ,flags) flags)))))) (propagated-inputs `(("mpi" ,openmpi))))) (define-public starpu+fxt (package (inherit starpu) ;; =E2=80=A6 (arguments (substitute-keyword-arguments (package-arguments starpu) ((#:configure-flags flags '()) `(cons "--with-fxt" ,flags)))))) --8<---------------cut here---------------end--------------->8--- The first package, =E2=80=98starpu=E2=80=99, has its arguments depend on: (package-propagated-inputs this-package) This is smart because if you inherit from it without changing the =E2=80=98arguments=E2=80=99 field (for instance by doing =E2=80=98--with-in= put=3Dopenmpi=3Dnmad=E2=80=99), it=E2=80=99ll adjust its configure flags based on the MPI package it actual= ly depends on. However, this trick doesn=E2=80=99t work with the second package, =E2=80=98= starpu-fxt=E2=80=99: if you do: guix build starpu-fxt --with-input=3Dopenmpi=3Dnmad the =E2=80=98--enable-nmad=E2=80=99 configure flag will not be passed. Thi= s is because =E2=80=98starpu-fxt=E2=80=99 calls: (package-arguments starpu) which returns the original arguments of =E2=80=98starpu=E2=80=99. Still here? :-) This is admittedly a pretty far-fetched example and there are ways to work around it=C2=B9. Still, I wonder if we could up with a linguistic device (ah ha!) to address that. We don=E2=80=99t want to (package-arguments this-package) here: that would naturally lead to an infinite loop. But we want something close to it, in spirit: (package-arguments parent), where =E2=80=98parent=E2=80=99 is th= e package we inherit from. (package-arguments parent) could call the =E2=80=98arguments=E2=80=99 thunk= of the parent, but it would pass it the child as its argument. Or something like that. Thoughts? Ludo=E2=80=99. =C2=B9 https://gitlab.inria.fr/guix-hpc/guix-hpc/-/commit/761cfe97d5bb42dbb= de538593cef93e803086e3b
Content-Disposition: inline Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 X-Mailer: MIME-tools 5.505 (Entity 5.505) Content-Type: text/plain; charset=utf-8 X-Loop: help-debbugs@HIDDEN From: help-debbugs@HIDDEN (GNU bug Tracking System) To: Ludovic =?UTF-8?Q?Court=C3=A8s?= <ludovic.courtes@HIDDEN> Subject: bug#50335: Acknowledgement (Inheritance vs. =?UTF-8?Q?=E2=80=98this-package=E2=80=99?=) Message-ID: <handler.50335.B.163059052110907.ack <at> debbugs.gnu.org> References: <87r1e73x78.fsf@HIDDEN> X-Gnu-PR-Message: ack 50335 X-Gnu-PR-Package: guix Reply-To: 50335 <at> debbugs.gnu.org Date: Thu, 02 Sep 2021 13:49:02 +0000 Thank you for filing a new bug report with debbugs.gnu.org. This is an automatically generated reply to let you know your message has been received. Your message is being forwarded to the package maintainers and other interested parties for their attention; they will reply in due course. As you requested using X-Debbugs-CC, your message was also forwarded to philippe.swartvagher@HIDDEN (after having been given a bug report number, if it did not have one). Your message has been sent to the package maintainer(s): bug-guix@HIDDEN If you wish to submit further information on this problem, please send it to 50335 <at> debbugs.gnu.org. Please do not send mail to help-debbugs@HIDDEN unless you wish to report a problem with the Bug-tracking system. --=20 50335: http://debbugs.gnu.org/cgi/bugreport.cgi?bug=3D50335 GNU Bug Tracking System Contact help-debbugs@HIDDEN with problems
X-Loop: help-debbugs@HIDDEN Subject: bug#50335: Inheritance vs. =?UTF-8?Q?=E2=80=98this-package=E2=80=99?= Resent-From: Ludovic =?UTF-8?Q?Court=C3=A8s?= <ludo@HIDDEN> Original-Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org> Resent-CC: bug-guix@HIDDEN Resent-Date: Sat, 04 Mar 2023 15:16:02 +0000 Resent-Message-ID: <handler.50335.B50335.167794296013090 <at> debbugs.gnu.org> Resent-Sender: help-debbugs@HIDDEN X-GNU-PR-Message: followup 50335 X-GNU-PR-Package: guix X-GNU-PR-Keywords: To: 50335 <at> debbugs.gnu.org Cc: philippe.swartvagher@HIDDEN Received: via spool by 50335-submit <at> debbugs.gnu.org id=B50335.167794296013090 (code B ref 50335); Sat, 04 Mar 2023 15:16:02 +0000 Received: (at 50335) by debbugs.gnu.org; 4 Mar 2023 15:16:00 +0000 Received: from localhost ([127.0.0.1]:37466 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>) id 1pYTc8-0003P4-F2 for submit <at> debbugs.gnu.org; Sat, 04 Mar 2023 10:16:00 -0500 Received: from eggs.gnu.org ([209.51.188.92]:60038) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from <ludo@HIDDEN>) id 1pYTc6-0003Os-Mj for 50335 <at> debbugs.gnu.org; Sat, 04 Mar 2023 10:15:59 -0500 Received: from fencepost.gnu.org ([2001:470:142:3::e]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from <ludo@HIDDEN>) id 1pYTc1-0006hT-ES; Sat, 04 Mar 2023 10:15:53 -0500 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=gnu.org; s=fencepost-gnu-org; h=MIME-Version:In-Reply-To:Date:References:Subject:To: From; bh=b47ay3h+IVD/0xO7LkpWHe+1mvO80vxnQXpjBFbjvIE=; b=fzT4OzaVpTWGORiN5NkI wbcjftKOajF1t/6VmOCsMZSat8DBglosr0uEhgqqHU9ru3wu3k7GmFTukG3lLjw51BdCoHI91JaxH AN1KsW5CQA1xjDu4qj4a0/+fu5tmcVN9qSABwrcrFFqBeilwKbLz7QZFo+3vQkJcDgVylpchkRHjO aVsBgJzUrq6UtdVL1OGSALG8mgtW2otyMnVmT00kAPA/5AEQi2R1B8UYobBvsyUWWoQgbRM9fMFxd 5Cev9bJ97JGcALCGDl8aIIzgFfA6ukM/Qv6oI68RtTOQ1n+kyOlKItX38ViZPnugyUA2vE/6M4BDB SR7XmVUOh4TXyw==; Received: from 91-160-117-201.subs.proxad.net ([91.160.117.201] helo=ribbon) by fencepost.gnu.org with esmtpsa (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from <ludo@HIDDEN>) id 1pYTc0-0007Jz-VI; Sat, 04 Mar 2023 10:15:53 -0500 From: Ludovic =?UTF-8?Q?Court=C3=A8s?= <ludo@HIDDEN> References: <87r1e73x78.fsf@HIDDEN> Date: Sat, 04 Mar 2023 16:15:50 +0100 In-Reply-To: <87r1e73x78.fsf@HIDDEN> ("Ludovic =?UTF-8?Q?Court=C3=A8s?="'s message of "Thu, 02 Sep 2021 15:48:27 +0200") Message-ID: <87a60stumx.fsf@HIDDEN> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/28.2 (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 <at> debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: <debbugs-submit.debbugs.gnu.org> List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe> List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/> List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org> List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help> List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe> Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org> X-Spam-Score: -3.3 (---) Ludovic Court=C3=A8s <ludovic.courtes@HIDDEN> skribis: > We stumbled upon an idiom for package arguments that, combined with > package inheritance, would not work as expected. [...] > We don=E2=80=99t want to (package-arguments this-package) here: that would > naturally lead to an infinite loop. But we want something close to it, > in spirit: (package-arguments parent), where =E2=80=98parent=E2=80=99 is = the package we > inherit from. > > (package-arguments parent) could call the =E2=80=98arguments=E2=80=99 thu= nk of the > parent, but it would pass it the child as its argument. Here=E2=80=99s an example where I ended up manually defining =E2=80=98paren= t=E2=80=99: https://git.savannah.gnu.org/cgit/guix.git/commit/?h=3Dcore-updates&id=3D= 0aed5bf5120bd434e53be0cea3f96547f95837d6 Ludo=E2=80=99.
Received: (at control) by debbugs.gnu.org; 21 Oct 2023 22:34:20 +0000 From debbugs-submit-bounces <at> debbugs.gnu.org Sat Oct 21 18:34:20 2023 Received: from localhost ([127.0.0.1]:45216 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>) id 1quKXw-0001XZ-QE for submit <at> debbugs.gnu.org; Sat, 21 Oct 2023 18:34:20 -0400 Received: from tilde.club ([2607:5300:204:4340::114]:40230 ident=postfix) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from <striness@HIDDEN>) id 1quKXr-0001XJ-Fe for control <at> debbugs.gnu.org; Sat, 21 Oct 2023 18:34:15 -0400 Received: by tilde.club (Postfix, from userid 5378) id CE654224101FA; Sat, 21 Oct 2023 22:33:41 +0000 (UTC) DKIM-Filter: OpenDKIM Filter v2.11.0 tilde.club CE654224101FA DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=tilde.club; s=mail; t=1697927621; bh=16BzXhth4up2eBhlwRIjWEqSWdkBnFNL4hOaFZR5ADc=; h=From:To:Subject:Date:From; b=GCUG8ZgDR/2aaR0Y7IZ9PA78hyrknzcZOzZwSupT8ddCm3aXQUGGQ0FoZ5mPnZ+rk SMFJK0nNj1jS+B3F5QBikJ1nRDZB3bcftIZ08tK44tlG2hNt0cxntv1OseKtnichgQ yDIju+TVFF9zx7iz9jHeDhyBVmi4pTXFRSfdCGh8= From: Ulf Herrman <striness@HIDDEN> To: control <at> debbugs.gnu.org Subject: Merge new duplicate Date: Sat, 21 Oct 2023 17:33:30 -0500 Message-ID: <87y1fvppvp.fsf@HIDDEN> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/28.2 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain X-Spam-Score: -0.0 (/) X-Debbugs-Envelope-To: control X-BeenThere: debbugs-submit <at> debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: <debbugs-submit.debbugs.gnu.org> List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe> List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/> List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org> List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help> List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe> Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org> X-Spam-Score: -1.0 (-) forcemerge 50335 66510
GNU bug tracking system
Copyright (C) 1999 Darren O. Benham,
1997 nCipher Corporation Ltd,
1994-97 Ian Jackson.