From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mp11.migadu.com ([2001:41d0:2:4a6f::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by ms0.migadu.com with LMTPS id kK+YMRnkGmKlUgEAgWs5BA (envelope-from ) for ; Sun, 27 Feb 2022 03:38:17 +0100 Received: from aspmx1.migadu.com ([2001:41d0:2:4a6f::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by mp11.migadu.com with LMTPS id 2InYLhnkGmKhGgAA9RJhRA (envelope-from ) for ; Sun, 27 Feb 2022 03:38:17 +0100 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 5B4962A680 for ; Sun, 27 Feb 2022 03:38:17 +0100 (CET) Received: from localhost ([::1]:38422 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1nO9Rw-0006BU-8Y for larch@yhetil.org; Sat, 26 Feb 2022 21:38:16 -0500 Received: from eggs.gnu.org ([209.51.188.92]:42250) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1nO9Rj-0006AO-9a for guix-patches@gnu.org; Sat, 26 Feb 2022 21:38:03 -0500 Received: from debbugs.gnu.org ([209.51.188.43]:34420) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1nO9Rj-0006Kv-1B for guix-patches@gnu.org; Sat, 26 Feb 2022 21:38:03 -0500 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1nO9Ri-0004E7-T9 for guix-patches@gnu.org; Sat, 26 Feb 2022 21:38:02 -0500 X-Loop: help-debbugs@gnu.org Subject: [bug#53878] [PATCH v6 06/24] gnu: racket-minimal: Change inheritance to follow bootstrapping. Resent-From: Philip McGrath Original-Sender: "Debbugs-submit" Resent-CC: guix-patches@gnu.org Resent-Date: Sun, 27 Feb 2022 02:38:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 53878 X-GNU-PR-Package: guix-patches X-GNU-PR-Keywords: patch To: 53878@debbugs.gnu.org, Liliana Marie Prikler , zimoun Cc: Philip McGrath , Ludovic =?UTF-8?Q?Court=C3=A8s?= , Maxime Devos , raingloom , Liliana Marie Prikler , Attila Lendvai , Malte Gerdes Received: via spool by 53878-submit@debbugs.gnu.org id=B53878.164592945216157 (code B ref 53878); Sun, 27 Feb 2022 02:38:02 +0000 Received: (at 53878) by debbugs.gnu.org; 27 Feb 2022 02:37:32 +0000 Received: from localhost ([127.0.0.1]:56542 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1nO9R9-0004CQ-L7 for submit@debbugs.gnu.org; Sat, 26 Feb 2022 21:37:32 -0500 Received: from mail-qt1-f171.google.com ([209.85.160.171]:33681) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1nO9R7-0004CD-2T for 53878@debbugs.gnu.org; Sat, 26 Feb 2022 21:37:26 -0500 Received: by mail-qt1-f171.google.com with SMTP id bt3so6088687qtb.0 for <53878@debbugs.gnu.org>; Sat, 26 Feb 2022 18:37:25 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=philipmcgrath.com; s=google; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=csYxz1KLSKiWhLrQOqhP0OIL5gVjxXKbeWBLNdaC9Rg=; b=OhNvuqmvJMii+fwQAq6EBmkU/fLNPhc/V796bGt8Vjc6wpWvnbuOZ/3z0HBdbIGeUs iPbnxSOJXFzdLDnobKYssJSNB0PeeudiAlSz8nvLreOoKwD3D30085W83idVtAdLYJob ifrhlaDsfkRISgyO1oMyKo7LjtcA8pIfMVpb4mIE4Iv0pkhb6RFJed7UxunL4CpX508B Mad0TdZ0P1YZT5RyuoWBwEMWzCLlAW0gscaNb1R+9Ezk0b14nb+tjgKDCJzfipDXWkYb akpUskV8sFPaVO1mBw4qkI5fiGf86daZTMenF6qp+NtZO0m3GAA/mOhQUv/VSB/SLQv5 q0UA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=csYxz1KLSKiWhLrQOqhP0OIL5gVjxXKbeWBLNdaC9Rg=; b=pnR6BPCTOr5FQncfDz4EyuHeb50KM4XqEE6ryX5By4+QnmMd2Jb2FhfskvWDKLlK+G qIlWuF/6ihfB4j9tiwVCoADba250m4+yg7B+O4WwyfCoLMc2UsxiRd4h+H+bzIRsBTmY wnhoNcOVGM5ymAcJqOI2WjpRiN73Os9GRnq9XtIZdj9AhJFYNKhwhOJhIhNARcm3U7AS Vd+rJlKoYWH5Xi9pm9pk1y/jMzqYq+fyAvmIbFN493jdr8zBtObgsBOjHpO9ITZZ9AK7 bde9FCYDf8RD5sMFMZDnS9fKsKP42DcjilJcDHp6/EJJ7y9qf9KZWOvr6GvfGkoQtOx4 AoOA== X-Gm-Message-State: AOAM533GfkG8DykPBKrnNvPBwvMPdZAJI+v2gwFg60LnAwyjNujX4wct rEATdL/A1KfortSlOYyOGPcSrjLmIaYyju8iN44= X-Google-Smtp-Source: ABdhPJwz3SunO7W2AsW7OhmSpZDzGxjGoD2h3dpLCvcjn+r+bfdVCT9NeD/r/cD/RMcVStqeLZxhhw== X-Received: by 2002:a05:622a:8d:b0:2dd:d979:bc46 with SMTP id o13-20020a05622a008d00b002ddd979bc46mr12374086qtw.342.1645929439440; Sat, 26 Feb 2022 18:37:19 -0800 (PST) Received: from localhost (c-73-125-98-51.hsd1.fl.comcast.net. [73.125.98.51]) by smtp.gmail.com with UTF8SMTPSA id o21-20020ac85a55000000b002d7847160c0sm4140270qta.82.2022.02.26.18.37.13 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Sat, 26 Feb 2022 18:37:19 -0800 (PST) From: Philip McGrath Date: Sat, 26 Feb 2022 21:34:32 -0500 Message-Id: <20220227023450.1877215-7-philip@philipmcgrath.com> X-Mailer: git-send-email 2.32.0 In-Reply-To: <20220227023450.1877215-1-philip@philipmcgrath.com> References: <20220220060610.178131-1-philip@philipmcgrath.com> <20220227023450.1877215-1-philip@philipmcgrath.com> MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 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 X-Migadu-Country: US ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=yhetil.org; s=key1; t=1645929497; 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:dkim-signature; bh=csYxz1KLSKiWhLrQOqhP0OIL5gVjxXKbeWBLNdaC9Rg=; b=jnoVLBLABaPnX7SvEVZyTxMGTY+7nh78PRo4ppgNXmWijjSwv2xWC13C9JNkI49cpsHtXJ 94jMauH0kSNwG3J4PVqVWxk16YCHxYUsxLbnt96je6+iMDyxtVHsm/2SxetsDpkQgZnUVN IEA2Mcw7kzX6zF8QPViCNQzfMN7q4os7n7p0scE0JwxnlR0RLhG/o7Xxcin8GYA4YRlfJg HuvqbkqUxygRq2v1qcjxn/pKJxTvKefdcXJ9VrzKe1jdaCwfV3ZJJh2TlA84PJkWphCQia Pc4PyARanfjoKRUF4orct9wJEFJn3MYZ8cHCQhN76gCjORlJ8stg1RHmGJdFcA== ARC-Seal: i=1; s=key1; d=yhetil.org; t=1645929497; a=rsa-sha256; cv=none; b=GBVCCG9bY5rF6QlQwj3hSgRRoSpGO6MQrNQ3tLV6cxEuK926XeGZp+Bx2fwe0Th45jnk+b /hfo+Iipe+FBOJQkVY0lHD0y3DlIPuOngnbw/P+F5ScSe+kQSd+y+Z6Lq4xd6QFj0D7f4j yayTW1OasU6ugNfC1aQIWTdR/sPaZFSsUBK2t0dcRNoQHFHAQ2+vwyOUOf+bDs6lA28fXg dBU9Dikw11FWm2ghddNkCfqG2zWs3faqdoUmwqp5iZdq2mkZdw6AfnU4Jpnf7EshUoveS2 YAhIEMwmRRBcZ9RTlUVNmoiOZmvQcDkdrqOmCVvMWEQ1BhoOzrMYck8UTb/lYg== ARC-Authentication-Results: i=1; aspmx1.migadu.com; dkim=fail ("headers rsa verify failed") header.d=philipmcgrath.com header.s=google header.b=OhNvuqmv; dmarc=none; spf=pass (aspmx1.migadu.com: domain of "guix-patches-bounces+larch=yhetil.org@gnu.org" designates 209.51.188.17 as permitted sender) smtp.mailfrom="guix-patches-bounces+larch=yhetil.org@gnu.org" X-Migadu-Spam-Score: 2.89 Authentication-Results: aspmx1.migadu.com; dkim=fail ("headers rsa verify failed") header.d=philipmcgrath.com header.s=google header.b=OhNvuqmv; dmarc=none; spf=pass (aspmx1.migadu.com: domain of "guix-patches-bounces+larch=yhetil.org@gnu.org" designates 209.51.188.17 as permitted sender) smtp.mailfrom="guix-patches-bounces+larch=yhetil.org@gnu.org" X-Migadu-Queue-Id: 5B4962A680 X-Spam-Score: 2.89 X-Migadu-Scanner: scn0.migadu.com X-TUID: 1HeIfkyvhDhS Having the package inheritance chain go in the same direction as the bootstrapping chain, rather than the opposite, is less confusing. In some cases, it can also help to avoid unnecessary rebuilds. * gnu/packages/racket.scm (racket-minimal-bc-cgc): Change to be the root of the package inheritance chain. [version, source, inputs, native-inputs, build-system, arguments, home-page, license]: Inline formerly inherited values. (racket-minimal-bc-3m): Inherit from 'racket-minimal-bc-cgc' rather than 'racket-minimal'. [inputs, native-inputs, arguments, license]: Adjust accordingly. (racket-minimal): Inherit from 'racket-minimal-bc-3m'. [inputs, native-inputs, arguments, license]: Adjust accordingly. [properties]: Override effect of 'hidden-package'. --- gnu/packages/racket.scm | 130 +++++++++++++++++++++------------------- 1 file changed, 67 insertions(+), 63 deletions(-) diff --git a/gnu/packages/racket.scm b/gnu/packages/racket.scm index b828bbbd3d..00f4fef49f 100644 --- a/gnu/packages/racket.scm +++ b/gnu/packages/racket.scm @@ -2,7 +2,7 @@ ;;; Copyright © 2013, 2014, 2015, 2016, 2018, 2020, 2021 Ludovic Courtès ;;; Copyright © 2017, 2018, 2019, 2020 Tobias Geerinckx-Rice ;;; Copyright © 2020 Pierre Neidhardt -;;; Copyright © 2021 Philip McGrath +;;; Copyright © 2021, 2022 Philip McGrath ;;; Copyright © 2021 jgart ;;; ;;; This file is part of GNU Guix. @@ -172,9 +172,9 @@ (define (make-unpack-nanopass+stex) (display "# to placate ../configure"))))) -(define-public racket-minimal +(define-public racket-minimal-bc-cgc (package - (name "racket-minimal") + (name "racket-minimal-bc-cgc") (version %racket-version) (source %racket-origin) (inputs @@ -184,19 +184,14 @@ (define-public racket-minimal sqlite bash-minimal ;; <- for `system` ncurses ;; <- for #%terminal - ;; only for CS - zlib - lz4)) - (native-inputs - (list chez-scheme-for-racket-bootstrap-bootfiles - racket-minimal-bc-3m)) + ;; only for BC variants: + libffi)) + (native-inputs (list libtool)) ;; <- only for BC variants (build-system gnu-build-system) (arguments (list #:configure-flags - #~(cons* "--enable-csonly" - "--enable-libz" - "--enable-lz4" + #~(cons* "--enable-cgcdefault" #$(racket-vm-common-configure-flags)) ;; Tests are in packages like racket-test-core and ;; main-distribution-test that aren't part of the main @@ -210,17 +205,6 @@ (define-public racket-minimal (guix build utils)) #:phases #~(modify-phases %standard-phases - (add-after 'unpack 'unpack-nanopass+stex - (lambda args - (with-directory-excursion "racket/src/ChezScheme" - #$(make-unpack-nanopass+stex)))) - (add-after 'unpack-nanopass+stex 'unpack-bootfiles - (lambda* (#:key native-inputs inputs #:allow-other-keys) - (with-directory-excursion "racket/src/ChezScheme" - (copy-recursively - (search-input-directory (or native-inputs inputs) - "lib/chez-scheme-bootfiles") - "boot")))) (add-before 'configure 'initialize-config.rktd (lambda* (#:key inputs #:allow-other-keys) (define (write-racket-hash alist) @@ -265,43 +249,37 @@ (define maybe-release-catalog ;; rmdir because we want an error if it isn't empty (rmdir (string-append #$output "/share/racket/pkgs"))))))) (home-page "https://racket-lang.org") - (synopsis "Racket without bundled packages such as DrRacket") - (description - "Racket is a general-purpose programming language in the Scheme family, -with a large set of libraries and a compiler based on Chez Scheme. Racket is -also a platform for language-oriented programming, from small domain-specific -languages to complete language implementations. + (synopsis "Old Racket implementation used for bootstrapping") + (description "This variant of the Racket BC (``before Chez'' or +``bytecode'') implementation is not recommended for general use. It uses +CGC (a ``Conservative Garbage Collector''), which was succeeded as default in +PLT Scheme version 370 (which translates to 3.7 in the current versioning +scheme) by the 3M variant, which in turn was succeeded in version 8.0 by the +Racket CS implementation. -The ``minimal Racket'' distribution includes just enough of Racket for you to -use @command{raco pkg} to install more. Bundled packages, such as the -DrRacket IDE, are not included.") +Racket BC [CGC] is primarily used for bootstrapping Racket BC [3M]. It may +also be used for embedding applications without the annotations needed in C +code to use the 3M garbage collector.") ;; https://download.racket-lang.org/license.html ;; The LGPL components are only used by Racket BC. - (license (list license:asl2.0 license:expat)))) + (license (list license:lgpl3+ license:asl2.0 license:expat)) + ;; Eventually, it may make sense for some vm packages to not be hidden, + ;; but this one is especially likely to remain hidden. + (properties `((hidden? . #t))))) (define-public racket-minimal-bc-3m (hidden-package (package - (inherit racket-minimal) + (inherit racket-minimal-bc-cgc) (name "racket-minimal-bc-3m") - (inputs - (modify-inputs (package-inputs racket-minimal) - (prepend libffi) ;; <- only for BC variants - (delete "zlib" "lz4"))) (native-inputs - (list libtool - (if (%current-target-system) - racket-minimal - racket-minimal-bc-cgc))) + (modify-inputs (package-native-inputs racket-minimal-bc-cgc) + (prepend racket-minimal-bc-cgc))) (arguments - (substitute-keyword-arguments (package-arguments racket-minimal) + (substitute-keyword-arguments (package-arguments racket-minimal-bc-cgc) ((#:configure-flags _ '()) #~(cons "--enable-bconly" - #$(racket-vm-common-configure-flags))) - ((#:phases cs-phases) - #~(modify-phases #$cs-phases - (delete 'unpack-nanopass+stex) - (delete 'unpack-bootfiles))))) + #$(racket-vm-common-configure-flags))))) (synopsis "Minimal Racket with the BC [3M] runtime system") (description "The Racket BC (``before Chez'' or ``bytecode'') implementation was the default before Racket 8.0. It uses a compiler written @@ -316,27 +294,53 @@ (define-public racket-minimal-bc-3m ;; The LGPL components are only used by Racket BC. (license (list license:lgpl3+ license:asl2.0 license:expat))))) -(define-public racket-minimal-bc-cgc +(define-public racket-minimal (package (inherit racket-minimal-bc-3m) - (name "racket-minimal-bc-cgc") - (native-inputs (list libtool)) + (name "racket-minimal") + (inputs + (modify-inputs (package-inputs racket-minimal-bc-cgc) + (prepend zlib lz4) + (delete "libffi"))) + (native-inputs + (modify-inputs (package-native-inputs racket-minimal-bc-cgc) + (delete "libtool") + (prepend chez-scheme-for-racket-bootstrap-bootfiles + racket-minimal-bc-3m))) (arguments (substitute-keyword-arguments (package-arguments racket-minimal-bc-3m) + ((#:phases bc-phases) + #~(modify-phases #$bc-phases + (add-after 'unpack 'unpack-nanopass+stex + (lambda args + (with-directory-excursion "racket/src/ChezScheme" + #$(make-unpack-nanopass+stex)))) + (add-after 'unpack-nanopass+stex 'unpack-bootfiles + (lambda* (#:key native-inputs inputs #:allow-other-keys) + (with-directory-excursion "racket/src/ChezScheme" + (copy-recursively + (search-input-directory (or native-inputs inputs) + "lib/chez-scheme-bootfiles") + "boot")))))) ((#:configure-flags _ '()) - #~(cons "--enable-cgcdefault" - #$(racket-vm-common-configure-flags))))) - (synopsis "Old Racket implementation used for bootstrapping") - (description "This variant of the Racket BC (``before Chez'' or -``bytecode'') implementation is not recommended for general use. It uses -CGC (a ``Conservative Garbage Collector''), which was succeeded as default in -PLT Scheme version 370 (which translates to 3.7 in the current versioning -scheme) by the 3M variant, which in turn was succeeded in version 8.0 by the -Racket CS implementation. + #~(cons* "--enable-csonly" + "--enable-libz" + "--enable-lz4" + #$(racket-vm-common-configure-flags))))) + (synopsis "Racket without bundled packages such as DrRacket") + (description + "Racket is a general-purpose programming language in the Scheme family, +with a large set of libraries and a compiler based on Chez Scheme. Racket is +also a platform for language-oriented programming, from small domain-specific +languages to complete language implementations. -Racket BC [CGC] is primarily used for bootstrapping Racket BC [3M]. It may -also be used for embedding applications without the annotations needed in C -code to use the 3M garbage collector."))) +The ``minimal Racket'' distribution includes just enough of Racket for you to +use @command{raco pkg} to install more. Bundled packages, such as the +DrRacket IDE, are not included.") + (properties `()) + ;; https://download.racket-lang.org/license.html + ;; The LGPL components are only used by Racket BC. + (license (list license:asl2.0 license:expat)))) (define-public chez-scheme-for-racket-bootstrap-bootfiles (package -- 2.32.0