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 cJCgHbFx52AibAEAgWs5BA (envelope-from ) for ; Thu, 08 Jul 2021 23:44:17 +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 mGwyGbFx52DLNAAAbx9fmQ (envelope-from ) for ; Thu, 08 Jul 2021 21:44:17 +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 8759314F53 for ; Thu, 8 Jul 2021 23:44:16 +0200 (CEST) Received: from localhost ([::1]:55878 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1m1bod-00078r-CC for larch@yhetil.org; Thu, 08 Jul 2021 17:44:15 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:55632) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1m1boQ-00076I-8J for guix-patches@gnu.org; Thu, 08 Jul 2021 17:44:02 -0400 Received: from debbugs.gnu.org ([209.51.188.43]:46226) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1m1boQ-0001ey-06 for guix-patches@gnu.org; Thu, 08 Jul 2021 17:44:02 -0400 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1m1boP-0008EJ-RS for guix-patches@gnu.org; Thu, 08 Jul 2021 17:44:01 -0400 X-Loop: help-debbugs@gnu.org Subject: [bug#49280] [PATCH 0/4] gnu: racket: Add racket-next. Bootstrap from C. Resent-From: Ludovic =?UTF-8?Q?Court=C3=A8s?= Original-Sender: "Debbugs-submit" Resent-CC: guix-patches@gnu.org Resent-Date: Thu, 08 Jul 2021 21:44:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 49280 X-GNU-PR-Package: guix-patches X-GNU-PR-Keywords: patch To: Philip McGrath Cc: 49280@debbugs.gnu.org Received: via spool by 49280-submit@debbugs.gnu.org id=B49280.162578063131608 (code B ref 49280); Thu, 08 Jul 2021 21:44:01 +0000 Received: (at 49280) by debbugs.gnu.org; 8 Jul 2021 21:43:51 +0000 Received: from localhost ([127.0.0.1]:57772 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1m1boE-0008Dk-G2 for submit@debbugs.gnu.org; Thu, 08 Jul 2021 17:43:50 -0400 Received: from eggs.gnu.org ([209.51.188.92]:57752) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1m1boB-0008DU-7u for 49280@debbugs.gnu.org; Thu, 08 Jul 2021 17:43:48 -0400 Received: from fencepost.gnu.org ([2001:470:142:3::e]:53424) by eggs.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1m1bo5-0001XV-RY; Thu, 08 Jul 2021 17:43:41 -0400 Received: from [2a01:e0a:1d:7270:af76:b9b:ca24:c465] (port=42860 helo=ribbon) by fencepost.gnu.org with esmtpsa (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1m1bo5-0003qb-Jy; Thu, 08 Jul 2021 17:43:41 -0400 From: Ludovic =?UTF-8?Q?Court=C3=A8s?= References: <20210629215255.3110238-1-philip@philipmcgrath.com> <20210629215742.3112654-1-philip@philipmcgrath.com> <20210629215742.3112654-4-philip@philipmcgrath.com> Date: Thu, 08 Jul 2021 23:43:39 +0200 In-Reply-To: <20210629215742.3112654-4-philip@philipmcgrath.com> (Philip McGrath's message of "Tue, 29 Jun 2021 17:57:42 -0400") Message-ID: <87eec8jxbo.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: guix-patches@gnu.org List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: guix-patches-bounces+larch=yhetil.org@gnu.org Sender: "Guix-patches" X-Migadu-Flow: FLOW_IN ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=yhetil.org; s=key1; t=1625780656; 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=GE1qi3Q6b50AiRzntTaXzN2InPSu3ibR4VkhurmWiMo=; b=Nr34pgNDOf0tnD6qhF5Ua7Z8hqFlSTDuD7gwFn1EhqSyeySjhoMbGvAAENXoQPNuhUNxTI PkLWYPsuzYUZj1OxahAjSQYMsLnUOySfIhnruVyaenLniMZm2/qGMIPgw9jKocCdniMCo0 FYVhQ7R9WhlOijXo4lH+0KEZ0yWdiXExDl/1X1rGu7QHHHJy/e8VSNvYgx7LoUa2r+evVQ ognnK5nduD009GDqmWYG2Juk4h2kVF+QgkazpnV08djE7wk2v17cHZ2FdnHmMgLRTZSDlr EDoWQMVxdbsU6JadAAFA5qU+lGcgZteSmxc2zbqemXkyxtsdFKbm8NJNPtO9yg== ARC-Seal: i=1; s=key1; d=yhetil.org; t=1625780656; a=rsa-sha256; cv=none; b=NhowymErSzx3b8pyXqrEHFZHI4s6LFtUpz5or21D8R5OTyrKV6P+DJ7Tylt59Eqbq5ZAX9 dqkJVL6hX5oxBKjPAynceFTwTS8A9H7phEBQnbqDCVGEAQTiDkEbaR+gZTnhiQCX6Oe9KB TneB5qNh0SilhhocVx4KksF3KVil3yCf7+3Eg6FADp5NBxR0uhFoUT2c8WMc9LG1YcaMYl GIOfj7fsfQ/sn67ZP6zlczzT+i8A6GyaKtuWGeHwVDpNlxpTTw0s4/5L2OfWKUvQy4RigT eQfqBYhbdXD9wExN9xFhIvauaPIDxnw4ThBjgSs9E9f+wJ7jnlNLByyy/jtBsw== ARC-Authentication-Results: i=1; aspmx1.migadu.com; dkim=none; dmarc=pass (policy=none) header.from=gnu.org; spf=pass (aspmx1.migadu.com: domain of guix-patches-bounces@gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=guix-patches-bounces@gnu.org X-Migadu-Spam-Score: -2.91 Authentication-Results: aspmx1.migadu.com; dkim=none; dmarc=pass (policy=none) header.from=gnu.org; spf=pass (aspmx1.migadu.com: domain of guix-patches-bounces@gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=guix-patches-bounces@gnu.org X-Migadu-Queue-Id: 8759314F53 X-Spam-Score: -2.91 X-Migadu-Scanner: scn0.migadu.com X-TUID: cIxLuAKrwvBJ Hi, Philip McGrath skribis: > This commit bootstraps the Racket compiler and runtime system from source, > including Racket CS as well as both variants of Racket BC. (One remaining > limitation is discussed in comments added to gnu/packages/racket.scm.) > > In the process, it moves to building minimal Racket from the Git reposito= ry, > rather than the packaged source tarballs. The Git repository is slightly > better as the ``corresponding source'': > > 1. A few packages especially closely tied to the Racket core implementat= ion > (like "compiler-lib", "base", and "racket-doc") are developed in the > same Git repository. Having them use the same Guix origin, too, will > help to keep them in sync. > > 2. The top-level Makefile in the Git repository is an important > ``script[] used to control compilation and installation.'' > In particular, it cooperates with the "distro-build" package to > create the source tarballs and installers for a Racket distribution. > (Racket supports a notion of custom distributions.) > > 3. It is ``the preferred form ... for making modifications'' to the core > Racket implementation. > > Racket releases are tagged in the Git repository (e.g. "v8.1"). At the > beginning of each release cycle, a branch is created to stabalize a versi= on > for extra testing. Active development happens on the "master" branch. > > * gnu/packages/racket-next-minimal-sh-via-rktio.patch: New file, coppied > from racket-sh-via-rktio.patch to accomodate an extra directory layer. > When racket-next-minimal becomes racket-minimal, this version will be > the only one needed. > * gnu/local.mk (dist_patch_DATA): Add it. > * gnu/local/racket.scm (cfg-flag:sh-for-rktio, cfg-flag:enable-lt, > cfg-flag:enable-racket, unpack-nanopass+stex, > %main-repo-main-distribution-pkgs): New private variables. > * gnu/local/racket.scm (racket-next-minimal)[source]: Use Git. > [source](snippet): Unbundle nanopass, stex, and libffi. > [inputs]: List explicitly. > [native-inputs]: Use racket-next-bootstrap-bootfiles, plus its > dependencies (for Chez, plus a Racket for bootstrappig). > [arguments]: Revise extensively. > * gnu/local/racket.scm (racket-next-minimal-bc-3m, > racket-next-minimal-bc-cgc): New packages, hidden at least for now. > (racket-next-bootstrap-chez-bootfiles): Another new package, but this one > is especially likely to stay hidden. > * gnu/local/racket.scm (racket-next)[origin](snippet): Unbundle packages > developed in the main Git repository, but leave their links.rktd and > pkgs.rktd entries in place. > [native-inputs]: Add the main Racket Git repository. > [arguments](#:phases): Adjust 'unpack-packages to also unpack package > sources from the main Racket Git repository. Exciting! [...] > + (method git-fetch) > + (uri (git-reference > + (url "https://github.com/racket/racket") > + (commit "0874b76de4f147ada46607857d8acf8445a1073d"))) > (sha256 > (base32 > - "0dm849wvlaxpfgz2qmgy2kwdslyi515rxn1m1yff38lagbn21vxq")) > - (uri (string-append %pre-release-installers > - "racket-minimal-src.tgz")))))) > + "0gy6rwyrpaij5k5pcyiif821b4vffqiaxg1vpg4iykw2c5ypfp43")) > + (file-name > + (git-file-name name version)) > + (patches > + (search-patches > + "racket-next-minimal-sh-via-rktio.patch")) Please keep these on a single line, as in: (file-name (git-file-name name version)) > + (replace 'configure > + (let ((inner (assq-ref %standard-phases 'configure))) > + (lambda args > + (chdir "racket/src") > + (apply inner args)))) I=E2=80=99d find it clearer like this: (add-before 'configure 'change-directory (lambda _ (chdir "racket/src"))) > + (add-after 'install 'remove-pkgs-directory > + ;; otherwise, e.g., `raco pkg show` will try and fail to > + ;; create a lock file > + (lambda* (#:key outputs #:allow-other-keys) > + ;; rmdir because we want an error if it isn't empty > + (rmdir (string-append (assoc-ref outputs "out") > + "/share/racket/pkgs")) > + #t))))) Please write full sentences with a bit more context (=E2=80=9CRemove package directory, otherwise =E2=80=98raco pkg show=E2=80=99 =E2=80=A6=E2=80=9D). > +(define-public racket-next-minimal-bc-3m > + (hidden-package > + (package/inherit racket-next-minimal > + (name "racket-next-minimal-bc-3m") This is =E2=80=9C-next=E2=80=9D because it=E2=80=99s targeting 8.1, which i= s not released yet, right? Since it=E2=80=99s only used for bootstrapping, perhaps use =E2=80=98define= =E2=80=99 instead of =E2=80=98define-public=E2=80=99 and remove the call to =E2=80=98hidden-pack= age=E2=80=99. It should also be (package (inherit =E2=80=A6) =E2=80=A6) rather than (pack= age/inherit =E2=80=A6). The latter is only useful when defining variants of a package = (same version, same code) where the same security updates would apply. > + (inputs > + `(("libffi" ,libffi) ;; <- only for BC variants > + ,@(filter (match-lambda > + ((label . _) > + (not (member label > + '("zlib" "zlib:static" > + "lz4" "lz4:static"))))) > + (package-inputs racket-next-minimal)))) Please use this more common idiom: ,@(fold alist-delete (package-inputs racket-next-minimal) '("zlib" =E2=80= =A6)) (It matters notably because =E2=80=98guix style=E2=80=99 recognizes it: .) > + (synopsis "Minimal Racket with the BC [3M] runtime system") > + (description "The Racket BC (``before Chez'' or ``bytecode'') imple= mentation was the default before Racket 8.0. It uses a compiler written in = C targeting architecture-independent bytecode, plus a JIT compiler on most = platforms. Racket BC has a different C API than the newer runtune system (R= acket CS) supports a slightly different set of architectures than the curre= nt runtime system, Racket CS (based on ``Chez Scheme''). > + > +This packackage is the normal implementation of Racket BC with a precise= garbage collector, 3M (``Moving Memory Mana ^ Typo here, and lines too long (here and in other places). :-) Please also check what =E2=80=98guix lint=E2=80=99 thinks! > +(define-public racket-next-minimal-bc-cgc > + (package/inherit racket-next-minimal-bc-3m > + (name "racket-next-minimal-bc-cgc") > + (native-inputs > + (filter (match-lambda > + (("racket" . _) > + #f) > + (_ > + #t)) > + (package-native-inputs racket-next-minimal-bc-3m))) Rather: (alist-delete "racket" (package-native-inputs racket-next-minimal-b= c-3m)) > + (license (package-license chez-scheme))))) You cannot do that since here since potentially we could end up with circular top-level references from these two modules. Instead, restate what the license is. Thanks for all this! Ludo=E2=80=99.