From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mp1 ([2001:41d0:2:bcc0::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by ms0.migadu.com with LMTPS id QFBqKMkNtWBYBAEAgWs5BA (envelope-from ) for ; Mon, 31 May 2021 18:24:41 +0200 Received: from aspmx1.migadu.com ([2001:41d0:2:bcc0::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by mp1 with LMTPS id MMHCI8kNtWC6aQAAbx9fmQ (envelope-from ) for ; Mon, 31 May 2021 16:24:41 +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 13F1A1D4DF for ; Mon, 31 May 2021 18:24:41 +0200 (CEST) Received: from localhost ([::1]:37508 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1lnkiS-0005z4-RJ for larch@yhetil.org; Mon, 31 May 2021 12:24:36 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:46050) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1lnkhu-0005wx-Ms for bug-guix@gnu.org; Mon, 31 May 2021 12:24:03 -0400 Received: from debbugs.gnu.org ([209.51.188.43]:51378) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1lnkhu-0002aU-El for bug-guix@gnu.org; Mon, 31 May 2021 12:24:02 -0400 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1lnkhu-0006vd-9e for bug-guix@gnu.org; Mon, 31 May 2021 12:24:02 -0400 X-Loop: help-debbugs@gnu.org Subject: bug#48682: recursive import between (gnu packages chez) and (gnu packages racket) Resent-From: Ludovic =?UTF-8?Q?Court=C3=A8s?= Original-Sender: "Debbugs-submit" Resent-CC: bug-guix@gnu.org Resent-Date: Mon, 31 May 2021 16:24:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 48682 X-GNU-PR-Package: guix X-GNU-PR-Keywords: To: Philip McGrath Received: via spool by 48682-done@debbugs.gnu.org id=D48682.162247821826599 (code D ref 48682); Mon, 31 May 2021 16:24:02 +0000 Received: (at 48682-done) by debbugs.gnu.org; 31 May 2021 16:23:38 +0000 Received: from localhost ([127.0.0.1]:34691 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1lnkhW-0006uw-5S for submit@debbugs.gnu.org; Mon, 31 May 2021 12:23:38 -0400 Received: from eggs.gnu.org ([209.51.188.92]:52274) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1lnkhU-0006ui-Uy for 48682-done@debbugs.gnu.org; Mon, 31 May 2021 12:23:37 -0400 Received: from fencepost.gnu.org ([2001:470:142:3::e]:50500) by eggs.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1lnkhM-0002Ky-UI; Mon, 31 May 2021 12:23:30 -0400 Received: from [2a01:e0a:1d:7270:af76:b9b:ca24:c465] (port=48420 helo=ribbon) by fencepost.gnu.org with esmtpsa (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1lnkhM-00010Q-Lb; Mon, 31 May 2021 12:23:28 -0400 From: Ludovic =?UTF-8?Q?Court=C3=A8s?= References: <20210526205455.3431430c@riseup.net> <7bb14837-cd53-45f6-f572-7493c2b1bb50@philipmcgrath.com> <20210528040258.41d66653@riseup.net> <87o8ct5mal.fsf@gnu.org> X-URL: http://www.fdn.fr/~lcourtes/ X-Revolutionary-Date: 12 Prairial 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: Mon, 31 May 2021 18:23:27 +0200 In-Reply-To: (Philip McGrath's message of "Sat, 29 May 2021 18:02:42 -0400") Message-ID: <87lf7u3m9s.fsf@gnu.org> 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-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-BeenThere: bug-guix@gnu.org List-Id: Bug reports for GNU Guix List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: 48682-done@debbugs.gnu.org Errors-To: bug-guix-bounces+larch=yhetil.org@gnu.org Sender: "bug-Guix" X-Migadu-Flow: FLOW_IN ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=yhetil.org; s=key1; t=1622478281; h=from:from:sender:sender:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc:cc:mime-version:mime-version: content-type:content-type: content-transfer-encoding:content-transfer-encoding:resent-cc: resent-from:resent-sender:resent-message-id:in-reply-to:in-reply-to: references:references:list-id:list-help:list-unsubscribe: list-subscribe:list-post; bh=otnbNP2/Fh4IhLD9B0rV5joRqqkqJzECkGAkyg06xcM=; b=jgh9wyYoHIZBQuNx2Y4vlSh8uNWXEdWxhi1Pr02UbV9NiciSPu0dZAuTyXrd8j9Cdcye54 208C7SNjifgYic1mhHSOThvRGNmaBiXoCyYfT8IlhDDrjvRXu6bTmiZcvKjObgWDjoZhGl WcLMMObgs+pu7uTaDHNZ79hd7xTwne8DktJlwB8OfuYQevNL6YqDojbAyspPzEfe2RGcvW vxFopJHUPJNjgp6HocyNht9uI1qUvXTE/Kl4Q4RC1xILACwCqHPAFOU1sjfIwTwJX7UC+4 rgFbE4WcvVOLdDV//EvzZK/HvSGj+MEqgfJidab+gMcnaGYbO51tPkY6y1+JXg== ARC-Seal: i=1; s=key1; d=yhetil.org; t=1622478281; a=rsa-sha256; cv=none; b=cGqMHU7mgK8PrCbAfPotKUgX9wjnsQWOKivDMZcmYdr3N5rSVvkZhIwVEz728RAYUOCaKG HpLWu20WElFGnYy60ZcO+XUMlrMyAFsZPbRNse3yRDOZ4+622+sD9FW6MrZRrQRpLcwlx8 qYJ9VcijyMHoPf3HX6KumGVzyiDW4nyLAV99SAWXoN4K0w5u9trLCZ6tn4Frlqn4kRuzOf HaaKsvVQzS7faS1TQgXRc1d7MYm38kYQpaK2ivxUlt8u8EIrD0Kf7bbR3Uxe/dd3m98uoz L5hWU/ajr5TP/bpZWmbSw4XzybxPilEGtv/7bBBI17h7zFwamqp2JjlD+EpNOA== ARC-Authentication-Results: i=1; aspmx1.migadu.com; dkim=none; 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-Migadu-Spam-Score: -2.93 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-Migadu-Queue-Id: 13F1A1D4DF X-Spam-Score: -2.93 X-Migadu-Scanner: scn1.migadu.com X-TUID: TgdOK+MQVZck Hi, Philip McGrath skribis: > On 5/29/21 4:15 PM, Ludovic Court=C3=A8s wrote: >> In general we cannot use #:select for (gnu packages =E2=80=A6) modules b= ecause >> that doesn=E2=80=99t play well with circular module dependencies. > > Ah, interesting, I'll keep that in mind. I'm used to Racket, where all > cyclic module dependencies cause errors at compile time. Yeah, in hindsight, that=E2=80=99s probably safer=E2=80=A6 > Do you have any advice on what would be good practice? For package modules, the main things are: 1. Don=E2=80=99t use #:select or #:autoload for (gnu packages =E2=80=A6) = modules in a (gnu packages =E2=80=A6) module. 2. At the top level of a module, only refer to variables within that module. For instance, the following would be wrong: (define-module (gnu packages racket) #:use-module (gnu packages chez) =E2=80=A6) (define whatever ;; Wrong because =E2=80=98chez-scheme=E2=80=99 is defined in anoth= er module, ;; which might be part of a cycle with this one. (package (inherit chez-scheme) =E2=80=A6)) (define something (package ;; =E2=80=A6 (license (package-license chez-scheme)))) ;likewise Note that references from =E2=80=98inputs=E2=80=99 and =E2=80=98arguments= =E2=80=99 fields are perfectly fine (fortunately!) because those fields are =E2=80=9Cthunked=E2=80=9D (the= ir value is wrapped in a thunk). > In the near future, I'll want to get the `nanopass` and `stex` origins > for Racket, potentially via `(package-inputs > chez-scheme)`---especially because those are not exported > variables. And also this part: > >> - The `chez-scheme` phases `unpack-nanopass+stex`, `configure`, >> `prepare-stex`, and `install-doc` should be shared with Racket. >> I think it would be better to put them in a build-side module and >> actually share them, rather than to do tricky things to extract >> their s-expression representation from >> `(package-arguments chez-scheme)`. On the other hand, I think a >> build system would be overkill: it would only build vanilla Chez >> and Racket-flavored Chez. > > I'm getting very close to being able to make `racket` accept > `racket-minimal` as an input, rather than duplicate most of it. This > is exercising some features Racket has theoretically had for a while, > but which apparently didn't quite work until ... well, this afternoon > it worked for me outside of Guix, thanks to a bunch of fixes in the > last few weeks by Matthew Flatt. Neat. > Would it make sense for me, when some useful amount of this works, to > send a patch series adding a `racket-next` package? I think the > changes are too much to backport to Racket 8.1. Possibly, your call! :-) Thanks, Ludo=E2=80=99.