Message ID | d62e2b56-b929-4f0f-f819-4075ff48680f@gmail.com |
---|---|
State | New |
Headers |
Return-Path: <guix-patches-bounces+patchwork=mira.cbaines.net@gnu.org> X-Original-To: patchwork@mira.cbaines.net Delivered-To: patchwork@mira.cbaines.net Received: by mira.cbaines.net (Postfix, from userid 113) id E055027BBEA; Wed, 23 Feb 2022 19:32:18 +0000 (GMT) X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on mira.cbaines.net X-Spam-Level: X-Spam-Status: No, score=-3.7 required=5.0 tests=BAYES_00,DKIM_ADSP_CUSTOM_MED, DKIM_INVALID,DKIM_SIGNED,FREEMAIL_FROM,MAILING_LIST_MULTI, RCVD_IN_MSPIKE_H5,RCVD_IN_MSPIKE_WL,SPF_HELO_PASS,URIBL_BLOCKED autolearn=unavailable autolearn_force=no version=3.4.6 Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mira.cbaines.net (Postfix) with ESMTPS id 5B62627BBE9 for <patchwork@mira.cbaines.net>; Wed, 23 Feb 2022 19:32:18 +0000 (GMT) Received: from localhost ([::1]:32960 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from <guix-patches-bounces+patchwork=mira.cbaines.net@gnu.org>) id 1nMxN3-000853-IN for patchwork@mira.cbaines.net; Wed, 23 Feb 2022 14:32:17 -0500 Received: from eggs.gnu.org ([209.51.188.92]:50088) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from <Debian-debbugs@debbugs.gnu.org>) id 1nMxIx-0005sZ-0l for guix-patches@gnu.org; Wed, 23 Feb 2022 14:28:04 -0500 Received: from debbugs.gnu.org ([209.51.188.43]:52677) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from <Debian-debbugs@debbugs.gnu.org>) id 1nMxIw-0005xP-Nf for guix-patches@gnu.org; Wed, 23 Feb 2022 14:28:02 -0500 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from <Debian-debbugs@debbugs.gnu.org>) id 1nMxIw-0007pO-HK for guix-patches@gnu.org; Wed, 23 Feb 2022 14:28:02 -0500 X-Loop: help-debbugs@gnu.org Subject: [bug#53878] [PATCH v3 09/15] gnu: Add racket-vm-cgc. Resent-From: Philip McGrath <philip.mcgrath@gmail.com> Original-Sender: "Debbugs-submit" <debbugs-submit-bounces@debbugs.gnu.org> Resent-CC: guix-patches@gnu.org Resent-Date: Wed, 23 Feb 2022 19:28:02 +0000 Resent-Message-ID: <handler.53878.B53878.164564443230016@debbugs.gnu.org> Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 53878 X-GNU-PR-Package: guix-patches X-GNU-PR-Keywords: patch To: Liliana Marie Prikler <liliana.prikler@gmail.com>, Philip McGrath <philip@philipmcgrath.com>, 53878@debbugs.gnu.org, Ludovic =?utf-8?q?Court=C3=A8s?= <ludo@gnu.org> Cc: Attila Lendvai <attila@lendvai.name>, Maxime Devos <maximedevos@telenet.be>, Malte Gerdes <malte.f.gerdes@gmail.com>, raingloom <raingloom@riseup.net>, zimoun <zimon.toutoune@gmail.com> Received: via spool by 53878-submit@debbugs.gnu.org id=B53878.164564443230016 (code B ref 53878); Wed, 23 Feb 2022 19:28:02 +0000 Received: (at 53878) by debbugs.gnu.org; 23 Feb 2022 19:27:12 +0000 Received: from localhost ([127.0.0.1]:46572 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from <debbugs-submit-bounces@debbugs.gnu.org>) id 1nMxI8-0007o3-3x for submit@debbugs.gnu.org; Wed, 23 Feb 2022 14:27:12 -0500 Received: from mail-qv1-f52.google.com ([209.85.219.52]:39675) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from <philip.mcgrath@gmail.com>) id 1nMwnL-0006xX-So for 53878@debbugs.gnu.org; Wed, 23 Feb 2022 13:55:24 -0500 Received: by mail-qv1-f52.google.com with SMTP id a1so10078581qvl.6 for <53878@debbugs.gnu.org>; Wed, 23 Feb 2022 10:55:23 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=message-id:date:mime-version:user-agent:subject:content-language:to :cc:references:from:in-reply-to:content-transfer-encoding; bh=12c2JJJXeto50BbY2zuvCtk0Q6FQDOkttxIaRRkaXUE=; b=jrH+edyNX4TKETL+RTifa4uaHzx+q+Fp7ETyHQB5FCilxx4HSuS6xFEMlSSLm8JwSa av9BjFamEKJ098QBVg19g0BV39CQln9W54I/BavWQ3GAtfG8pxlQJr9+DaDQCLg0SVXP QYJ6lZJH/crh6uDZDAHMS8Csxdpxsipu0JJrdsML/i1uGo9HGoQl4SxosTQXLG894buL 9TyL4htefuHjnmcvEMSgyh1sfATzQchYAYoSckD3SpgRqSluAyhzrEtEiXDAfZICNBlp RTSfwkCrP+PcT6SU/WVBwG+f93lsEUZG5DFg28NNq3+l2UF1QCgq88ufLdE4Yi0NRF1u RZoA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:message-id:date:mime-version:user-agent:subject :content-language:to:cc:references:from:in-reply-to :content-transfer-encoding; bh=12c2JJJXeto50BbY2zuvCtk0Q6FQDOkttxIaRRkaXUE=; b=MGurJSGaYhNedITSWBUweeXUC+0MWViaHUgRPxWjxWs0cEJ5Uv9wVJWKqzA9qJfV08 8iWa0SsPfExhHjLTb+gIoNuNZKAgG2h6mXaw1FHIvVooHyBLiIlje8245D0ZzfMNmG31 v0U1tg0Y3ZxqxgmqeS48TkDSOiC4MYo9/ldFaQHnXXfLNuzhVXWmJXHjZHGBBf6j6tT4 KEBNYZSkXIO9csMnHli2wCWlO5hPN/XZ2DEwrqLSYax1ZExR9jDtvpxFEu0/gvxQxY1Z sQnBmP5eqV/SVo2hqV014e5Ngf5mxzFPpjpGJoqcjYYW6PJ8xbrG8VRmloPOfv1L01Ki tMlA== X-Gm-Message-State: AOAM532Oh0ABU5iRfcs0r7UF/DnEQ0ydigzV76H4t8SojdeMGa9Kg+vw B6gsoXOTadwyJoGHZOYHypA= X-Google-Smtp-Source: ABdhPJxZ7QK0BoO2MWE+kCbOjQQ50nF2kDKSyXJE4OJMLVIBmt2PkakAhXNFRw4myKjRP66tQ+u8Dw== X-Received: by 2002:ad4:450d:0:b0:432:6b36:acb2 with SMTP id k13-20020ad4450d000000b004326b36acb2mr641233qvu.130.1645642518200; Wed, 23 Feb 2022 10:55:18 -0800 (PST) Received: from [192.168.45.36] (c-73-125-98-51.hsd1.fl.comcast.net. [73.125.98.51]) by smtp.gmail.com with ESMTPSA id e3sm269483qto.25.2022.02.23.10.55.17 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Wed, 23 Feb 2022 10:55:17 -0800 (PST) Message-ID: <d62e2b56-b929-4f0f-f819-4075ff48680f@gmail.com> Date: Wed, 23 Feb 2022 13:55:16 -0500 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:91.0) Gecko/20100101 Thunderbird/91.5.0 Content-Language: en-US References: <20220208151316.1897345-1-philip@philipmcgrath.com> <1853902.IiyMIqa0Cy@bastet> <b56e581b0d7ebf4ff2d856e5ebec54e0653a6298.camel@gmail.com> <5037281.s90xYg8xyF@bastet> <c96e78117ed7194b2d08d2768a81ee030b1174c7.camel@gmail.com> From: Philip McGrath <philip.mcgrath@gmail.com> In-Reply-To: <c96e78117ed7194b2d08d2768a81ee030b1174c7.camel@gmail.com> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 8bit X-Mailman-Approved-At: Wed, 23 Feb 2022 14:27:10 -0500 X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-Mailman-Approved-At: Wed, 23 Feb 2022 14:31:38 -0500 X-BeenThere: guix-patches@gnu.org List-Id: <guix-patches.gnu.org> List-Unsubscribe: <https://lists.gnu.org/mailman/options/guix-patches>, <mailto:guix-patches-request@gnu.org?subject=unsubscribe> List-Archive: <https://lists.gnu.org/archive/html/guix-patches> List-Post: <mailto:guix-patches@gnu.org> List-Help: <mailto:guix-patches-request@gnu.org?subject=help> List-Subscribe: <https://lists.gnu.org/mailman/listinfo/guix-patches>, <mailto:guix-patches-request@gnu.org?subject=subscribe> Errors-To: guix-patches-bounces+patchwork=mira.cbaines.net@gnu.org Sender: "Guix-patches" <guix-patches-bounces+patchwork=mira.cbaines.net@gnu.org> X-getmail-retrieved-from-mailbox: Patches |
Series |
None
|
|
Commit Message
Philip McGrath
Feb. 23, 2022, 6:55 p.m. UTC
Hi, On 2/20/22 13:13, Liliana Marie Prikler wrote: >> Given Ludo’'s explanation, I think the difference (or at least an >> important difference) is that those functions are defined in `(guix >> ...)` modules, as opposed to `(gnu packages ...)` modules. >> >> But I wish I knew with any degree of certainty *why* this would be >> true, if indeed it is. >> >> Maybe Maxime knows? > Both Ludo and Maxime already explained this, but to be extra clear, > it's the thunking. > > (define foo <something-in-bar.scm>) > (define bar <something-in-foo.scm>) <- problem > > (define (foo) <something-in-bar.scm>) > (define bar <something-in-foo.scm>) <- no problem. > > Since inputs are thunked, you can define chez in chez.scm and racket in > racket.scm and use them as input to each other without breaking the > compiler (you will break the package builder though). If you want > something more meaningful, you can define racket-minimal in racket.scm > and use it in chez.scm as input to a package, then use that package as > input to racket. This does not work for (source ) and (inherit ) > however, because those forms are not thunked. You would have to thunk > them until you reach a save haven (like a package's inputs), where you > can call the thunk to produce a value. To try to be concrete, I made the patch below as a mock-up of part of your earlier suggestion (IIUC): On 2/20/22 04:03, Liliana Marie Prikler wrote: > Inside chez-and-racket-bootstrap, define (make-<package>) functions for > the following: > - chez-bootstrap-bootfiles, chez-for-racket-bootstrap-bootfiles: > Taking version and origin. > - racket-vm-cgc: Taking version and origin. > - racket-vm-bc: Taking racket-vm-cgc. > - racket-vm-cs: Taking racket-vm-bc. > ... > > Inside racket, define %racket-version, %racket-origin, racket-minimal > and racket. It'd also be good if you made local definitions > (define racket-vm-cgc (make-racket-vm-cgc %racket-version %racket- > origin)) > (define racket-vm-bc (make-racket-vm-bc racket-vm-cgc)) > ... > in this file. This applies on top of v4, or I've put it at <https://gitlab.com/philip1/guix-patches/-/commit/982fe7cfb4d33103ee611acc310e3225ccf35852> if that's easier for anyone: --8<---------------cut here---------------start------------->8--- From 982fe7cfb4d33103ee611acc310e3225ccf35852 Mon Sep 17 00:00:00 2001 From: Philip McGrath <philip@philipmcgrath.com> Date: Wed, 23 Feb 2022 11:13:43 -0500 Subject: [PATCH] example of import problems --- gnu/packages/chez-and-racket-bootstrap.scm | 4 ++++ gnu/packages/racket.scm | 3 +++ 2 files changed, 7 insertions(+) ORIGIN into a new file-like object. In the resulting file-like object, the package source
Comments
Hi, Am Mittwoch, dem 23.02.2022 um 13:55 -0500 schrieb Philip McGrath: > To try to be concrete, I made the patch below as a mock-up of part of > your earlier suggestion (IIUC): > > On 2/20/22 04:03, Liliana Marie Prikler wrote: > > Inside chez-and-racket-bootstrap, define (make-<package>) > functions for > > the following: > > - chez-bootstrap-bootfiles, chez-for-racket-bootstrap-bootfiles: > > Taking version and origin. > > - racket-vm-cgc: Taking version and origin. > > - racket-vm-bc: Taking racket-vm-cgc. > > - racket-vm-cs: Taking racket-vm-bc. > > > Inside racket, define %racket-version, %racket-origin, racket- > minimal > > and racket. It'd also be good if you made local definitions > > (define racket-vm-cgc (make-racket-vm-cgc %racket-version %racket- > > origin)) > > (define racket-vm-bc (make-racket-vm-bc racket-vm-cgc)) > > ... > > in this file. > > This applies on top of v4, or I've put it at > < > https://gitlab.com/philip1/guix-patches/-/commit/982fe7cfb4d33103ee611acc310e3225ccf35852 > > > if that's easier for anyone: To be fair, the issue here is with my proposal, which doesn't completely thunk through. I clarified later on that it would need another pair of brackets or – if that's easier for you – commented on the commit you've linked. > Overall, I certainly agree that duplicating the definition of > `%racket-version` is not ideal. I'd be glad for you or anyone to > improve the situation, and I'll try to get my head around Maxime's > email about the underlying semantics. > > But I am confident that v4 of this series is at least not broken, if > perhaps not maximally beautiful. Especially given that I, for one, > have tried things that initially seemed correct only to discover > subtle problems later, I think it would be better for any refinements > to come in follow-on patches later. I can understand the sentiment, but there are some things that still don't feel right for me – for instance the fact, that seemingly unrelated modules now have to pull in racket bootstrap sounds like a recipe for trouble. The final patch in the series also still does too much for me to wrap my head around, which makes it difficult to audit. Therefore, one question I have w.r.t. updating Racket is whether we could theoretically bump the version while keeping the old bootstrap, and then adjust the bootstrap by adding all the packages you've made. It does seem to be an all or nothing deal when doing the bootstrap first, but that need not necessarily hold for bootstrap second. Also, accepting for a moment that we might have to move chez-scheme and other important things into chez-scheme-and-racket-bootstrap (even though I'm not really content with it), I still wonder if we could introduce chez-scheme-for-system first (defined as simply chez-scheme initially) and adjust the callers, then move chez-scheme while keeping the function in chez.scm and finally do the magic with making it either chez or racket. I know I have a tendency towards being overly cautious when it comes to pushing big changes, so if that's the case I'd be happy if someone else were to take over. That said, I do feel somewhat lonely at the moment despite the many people specifically mentioned in "To:" and "Cc:", so I'm somewhat content with moving slowly for now. Cheers
Hi Liliana, Thanks Philip for these large series. > I know I have a tendency towards being overly cautious when it comes to > pushing big changes, so if that's the case I'd be happy if someone else > were to take over. That said, I do feel somewhat lonely at the moment > despite the many people specifically mentioned in "To:" and "Cc:", so > I'm somewhat content with moving slowly for now. Sorry, I am running out of time and the series is quite large; the changes are not really atomic. ;-) On Wed, 23 Feb 2022 at 21:31, Liliana Marie Prikler <liliana.prikler@gmail.com> wrote: > > But I am confident that v4 of this series is at least not broken, if > > perhaps not maximally beautiful. Especially given that I, for one, > > have tried things that initially seemed correct only to discover > > subtle problems later, I think it would be better for any refinements > > to come in follow-on patches later. > > I can understand the sentiment, but there are some things that still > don't feel right for me – for instance the fact, that seemingly > unrelated modules now have to pull in racket bootstrap sounds like a > recipe for trouble. The final patch in the series also still does too > much for me to wrap my head around, which makes it difficult to audit. I understand both sentiments. I also have some difficulties for auditing the series. Well, it needs some time to sit down, fill the coffee pot and careful review. :-) I cannot promise but I will try to give a look next week; for what my reviewing eyes are worth. Cheers, simon
diff --git a/gnu/packages/chez-and-racket-bootstrap.scm b/gnu/packages/chez-and-racket-bootstrap.scm index b779099fb3..ea10f7fe92 100644 --- a/gnu/packages/chez-and-racket-bootstrap.scm +++ b/gnu/packages/chez-and-racket-bootstrap.scm @@ -47,6 +47,7 @@ (define-module (gnu packages chez-and-racket-bootstrap) #:use-module ((guix licenses) #:prefix license:) #:export (chez-scheme-for-system + make-racket-vm-cgc racket-vm-for-system)) ;; Commentary: @@ -199,6 +200,9 @@ (define-module (gnu packages chez-and-racket-bootstrap) ;; ;; Code: +(define (make-racket-vm-cgc a b) + 42) + (define* (chez-scheme-for-system #:optional (system (or (%current-target-system) (%current-system)))) diff --git a/gnu/packages/racket.scm b/gnu/packages/racket.scm index c2854f84e8..08e437a722 100644 --- a/gnu/packages/racket.scm +++ b/gnu/packages/racket.scm @@ -58,6 +58,9 @@ (define %racket-version "8.4") ; MUST match "chez-and-racket-bootstrap.scm" (define %racket-commit (string-append "v" %racket-version)) +(define fake-racket-vm-cgc + (make-racket-vm-cgc 1 2)) + (define (extract-package-source origin spec) "Extract the source for a Racket package specified by SPEC from