GNU logs - #52284, boring messages


Message sent to guix-devel@HIDDEN, bug-guix@HIDDEN:


X-Loop: help-debbugs@HIDDEN
Subject: bug#52284: Partially unifying packages and inferior packages
Resent-From: Maxime Devos <maximedevos@HIDDEN>
Original-Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
Resent-CC: guix-devel@HIDDEN, bug-guix@HIDDEN
Resent-Date: Sat, 04 Dec 2021 21:08:02 +0000
Resent-Message-ID: <handler.52284.B.163865203924150 <at> debbugs.gnu.org>
Resent-Sender: help-debbugs@HIDDEN
X-GNU-PR-Message: report 52284
X-GNU-PR-Package: guix
X-GNU-PR-Keywords: 
To: 52284 <at> debbugs.gnu.org
Cc: guix-devel@HIDDEN
X-Debbugs-Original-To: bug-guix@HIDDEN
X-Debbugs-Original-Xcc: guix-devel@HIDDEN
Received: via spool by submit <at> debbugs.gnu.org id=B.163865203924150
          (code B ref -1); Sat, 04 Dec 2021 21:08:02 +0000
Received: (at submit) by debbugs.gnu.org; 4 Dec 2021 21:07:19 +0000
Received: from localhost ([127.0.0.1]:55292 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1mtcFa-0006HS-JC
	for submit <at> debbugs.gnu.org; Sat, 04 Dec 2021 16:07:18 -0500
Received: from lists.gnu.org ([209.51.188.17]:49946)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <maximedevos@HIDDEN>) id 1mtcFY-0006HJ-CE
 for submit <at> debbugs.gnu.org; Sat, 04 Dec 2021 16:07:16 -0500
Received: from eggs.gnu.org ([209.51.188.92]:38878)
 by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256)
 (Exim 4.90_1) (envelope-from <maximedevos@HIDDEN>)
 id 1mtcFY-00067Q-7o
 for bug-guix@HIDDEN; Sat, 04 Dec 2021 16:07:16 -0500
Received: from newton.telenet-ops.be ([195.130.132.45]:58988)
 by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256)
 (Exim 4.90_1) (envelope-from <maximedevos@HIDDEN>)
 id 1mtcFV-0007U0-Op
 for bug-guix@HIDDEN; Sat, 04 Dec 2021 16:07:15 -0500
Received: from albert.telenet-ops.be (albert.telenet-ops.be
 [IPv6:2a02:1800:110:4::f00:1a])
 by newton.telenet-ops.be (Postfix) with ESMTPS id 4J62Dp1D2YzMqYmY
 for <bug-guix@HIDDEN>; Sat,  4 Dec 2021 22:01:46 +0100 (CET)
Received: from ptr-bvsjgyhxw7psv60dyze.18120a2.ip6.access.telenet.be
 ([IPv6:2a02:1811:8c09:9d00:3c5f:2eff:feb0:ba5a])
 by albert.telenet-ops.be with bizsmtp
 id SM1i2600F4UW6Th06M1ikN; Sat, 04 Dec 2021 22:01:42 +0100
Message-ID: <b1d6da8fe3d3afd8f04968a146cc47732eb0fa85.camel@HIDDEN>
From: Maxime Devos <maximedevos@HIDDEN>
Date: Sat, 04 Dec 2021 21:01:42 +0000
Content-Type: text/plain; charset="UTF-8"
User-Agent: Evolution 3.38.3-1 
MIME-Version: 1.0
Content-Transfer-Encoding: 8bit
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=telenet.be; s=r21;
 t=1638651702; bh=Rfdw0ZwltWpuljhWZB82Ug3FgqgBaqQq7mEhiEInSek=;
 h=Subject:From:To:Date;
 b=djNa66kVHHC356LqQnaxbj8SIHFD8C4WH31SIb1Pgq1nspKLvc/8GrC45XH366CYC
 14a6CdhmH3BeLTI1hkKuUyBygl9oiNmuZmMStJcZi+tjZCgTWybSqkkzivhHmVOGnT
 R9WUtPWE7mjxPpBOgV/S2sz8CphKdHbWoQlS8i8vCqS1SFcGiBVOcVZVQeJERBnZGo
 cAsB7kOMyQ35T5cS2pn95opErbWbV2QmS8IachTMdFiR14QTsXJdByxxFOn0bhWfd2
 wzXMrn9TSFA7+wptVL99Feb73aRj1oB2YiLaqVAEbULmPncJS5EG2s29mHwvgHvPGp
 IUzjcyrvSqw+w==
Received-SPF: pass client-ip=195.130.132.45;
 envelope-from=maximedevos@HIDDEN; helo=newton.telenet-ops.be
X-Spam_score_int: -27
X-Spam_score: -2.8
X-Spam_bar: --
X-Spam_report: (-2.8 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1,
 DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, FREEMAIL_FROM=0.001,
 RCVD_IN_DNSWL_LOW=-0.7, 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: -0.0 (/)
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 (--)

X-Debbugs-CC: guix-devel@HIDDEN

Hi guix,

There have been some bug reports with as root cause that inferior packages aren't
packages. I think that root cause is a bug. To resolve this, there was some talk on
using GOOP classes, or define-gexp-compiler-style polymorphism for package-native-inputs
etc., but these come with a complexity and time cost.

At the end of this e-mail, there is some untested code for turning an inferior
package into an equivalent package. If it's properly integrated into (guix inferior),
we could mostly do away with the inferior-package?/package? distinction,
by letting lookup-inferior-package and the like return ‘proper’ packages, albeit
with a weird build system and ignoring inheritance.

To be clear, I won't be working on this, but the idea seemed to nice to not send it.

Greetings,
Maxime

(define inferior-package-build-system
  (build-system
    (name 'inferior)
    (description "Build things via an inferior")
    (lower lower)))

(define* (lower name #:key inferior-package system target #:allow-other-keys)
  (bag ;; TODO(?): package transformations using bags won't work!
    (name name) ; ignored
    (system system) ; ignored
    (target target) ; ignored
    (arguments '()) ; ignored
    (build (lambda _
             (inferior-package->derivation inferior-package system #:target target)))))

(define (inferior-inputs->inputs inferior-inputs)
  (map (match-lamda
         ((label inf . rest)
          `(,label ,(inferior-package->package inf) ,@rest)))
       inferior-inputs))

(define (inferior-package->package inf)
  ;; TODO: somehow make sure no inheritance happens on this package
  (package
    (name (inferior-package-name inf))
    (version (inferior-package-version inf))
    (replacement (and=> (inferior-package-replacement inf) inferior-package->package))
    (source #f) ; TODO
    (build-system inferior-package-build-system)
    (arguments `(#:inferior-package ,inf))
    (synopsis (inferior-package-synopsis inf))
    (description (inferior-package-description inf))
    (home-page (inferior-package-home-page inf))
    (location (inferior-package-location inf))
    (inputs (map inferior-inputs->inputs (inferior-package-inputs inf)))
    (native-inputs (map inferior-inputs->inputs (inferior-package-native-inputs inf)))
    (propagated-inputs (map inferior-inputs->inputs (inferior-package-propagated-inputs inf)))
    (transitive-propagated-inputs (map inferior-inputs->inputs (inferior-package-transitive-propagated-inputs inf)))    
    (native-search-paths (propagated-package-native-search-paths inf))
    (search-paths (propagated-package-search-paths inf))
    (license #f)) ; TODO





Message sent:


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: Maxime Devos <maximedevos@HIDDEN>
Subject: bug#52284: Acknowledgement (Partially unifying packages and
 inferior packages)
Message-ID: <handler.52284.B.163865203924150.ack <at> debbugs.gnu.org>
References: <b1d6da8fe3d3afd8f04968a146cc47732eb0fa85.camel@HIDDEN>
X-Gnu-PR-Message: ack 52284
X-Gnu-PR-Package: guix
Reply-To: 52284 <at> debbugs.gnu.org
Date: Sat, 04 Dec 2021 21:08: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
  guix-devel@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 52284 <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
52284: http://debbugs.gnu.org/cgi/bugreport.cgi?bug=3D52284
GNU Bug Tracking System
Contact help-debbugs@HIDDEN with problems


Message sent to bug-guix@HIDDEN:


X-Loop: help-debbugs@HIDDEN
Subject: bug#52284: Partially unifying packages and inferior packages
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: Mon, 06 Dec 2021 13:15:02 +0000
Resent-Message-ID: <handler.52284.B52284.163879648330839 <at> debbugs.gnu.org>
Resent-Sender: help-debbugs@HIDDEN
X-GNU-PR-Message: followup 52284
X-GNU-PR-Package: guix
X-GNU-PR-Keywords: 
To: Maxime Devos <maximedevos@HIDDEN>
Cc: guix-devel@HIDDEN, 52284 <at> debbugs.gnu.org
Received: via spool by 52284-submit <at> debbugs.gnu.org id=B52284.163879648330839
          (code B ref 52284); Mon, 06 Dec 2021 13:15:02 +0000
Received: (at 52284) by debbugs.gnu.org; 6 Dec 2021 13:14:43 +0000
Received: from localhost ([127.0.0.1]:60799 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1muDpL-00081L-A7
	for submit <at> debbugs.gnu.org; Mon, 06 Dec 2021 08:14:43 -0500
Received: from eggs.gnu.org ([209.51.188.92]:57418)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <ludo@HIDDEN>) id 1muDpJ-000817-Jz
 for 52284 <at> debbugs.gnu.org; Mon, 06 Dec 2021 08:14:41 -0500
Received: from [2001:470:142:3::e] (port=50586 helo=fencepost.gnu.org)
 by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256)
 (Exim 4.90_1) (envelope-from <ludo@HIDDEN>)
 id 1muDpD-0005sv-Q1; Mon, 06 Dec 2021 08:14:35 -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=gm8+WXm9ZQJm7VmBhOHyy+i+1owef9IUrKRfiaCHvgE=; b=TjnN2s25WdiKSpD0CPCx
 X2UySrtK5+YqT+wSGRm015IQq/QdamMiDH03Zu50qv0nqamMENu1uyG7rkMInPLC6QriaycMEBc9c
 xxUH7ofzE17cnoL/9Hpwkr676xwyj871FUeU8yJnXFsyAR7veYLWZ8k4HJOKRnxa+wz/bBXxS5RGI
 9OqGTgE3PGjclZNX2Rd0leMQ155bYmBlJEwzUHT2OactD4jx9G+Q0DoxtPRcTMRO2E94mMeKZm9wi
 qSMfx88HydQpUeAf3QfxOyD0Lb7JvcHIauKZOdgIvX9bZhiiyq2tf3AIhKOhEl/c2gXSg7DY+Wlc8
 64BkYyLHUKhTrw==;
Received: from [193.50.110.120] (port=41688 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 1muDpD-0007aj-MF; Mon, 06 Dec 2021 08:14:35 -0500
From: Ludovic =?UTF-8?Q?Court=C3=A8s?= <ludo@HIDDEN>
References: <b1d6da8fe3d3afd8f04968a146cc47732eb0fa85.camel@HIDDEN>
X-URL: http://www.fdn.fr/~lcourtes/
X-Revolutionary-Date: 16 Frimaire an 230 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: Mon, 06 Dec 2021 14:14:33 +0100
In-Reply-To: <b1d6da8fe3d3afd8f04968a146cc47732eb0fa85.camel@HIDDEN>
 (Maxime Devos's message of "Sat, 04 Dec 2021 21:01:42 +0000")
Message-ID: <87bl1tnadi.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
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 (---)

Hi,

Maxime Devos <maximedevos@HIDDEN> skribis:

> (define (inferior-package->package inf)
>   ;; TODO: somehow make sure no inheritance happens on this package
>   (package
>     (name (inferior-package-name inf))
>     (version (inferior-package-version inf))
>     (replacement (and=3D> (inferior-package-replacement inf) inferior-pac=
kage->package))
>     (source #f) ; TODO
>     (build-system inferior-package-build-system)
>     (arguments `(#:inferior-package ,inf))
>     (synopsis (inferior-package-synopsis inf))
> =C2=A0   (description (inferior-package-description inf))
>     (home-page (inferior-package-home-page inf))
>     (location (inferior-package-location inf))
>     (inputs (map=C2=A0inferior-inputs->inputs (inferior-package-inputs in=
f)))
>     (native-inputs (map inferior-inputs->inputs (inferior-package-native-=
inputs inf)))
>     (propagated-inputs (map inferior-inputs->inputs (inferior-package-pro=
pagated-inputs inf)))
>     (transitive-propagated-inputs (map inferior-inputs->inputs (inferior-=
package-transitive-propagated-inputs inf)))=20=20=20=20
>     (native-search-paths (propagated-package-native-search-paths inf))
>     (search-paths (propagated-package-search-paths inf))
>     (license #f)) ; TODO

That=E2=80=99s a clever hack!

Longer-term, I think it would be nice(r) to use a type hierarchy somehow
so <inferior-package> instances can truly be used anywhere a <package>
is expected.

Thanks,
Ludo=E2=80=99.





Last modified: Mon, 6 Dec 2021 13:15:02 UTC

GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997 nCipher Corporation Ltd, 1994-97 Ian Jackson.