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 aFPaMm4f/WDO5AAAgWs5BA (envelope-from ) for ; Sun, 25 Jul 2021 10:23:10 +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 6ANjLm4f/WAvKAAAbx9fmQ (envelope-from ) for ; Sun, 25 Jul 2021 08:23:10 +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 E472636F7 for ; Sun, 25 Jul 2021 10:23:09 +0200 (CEST) Received: from localhost ([::1]:58178 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1m7ZPg-0002xX-TS for larch@yhetil.org; Sun, 25 Jul 2021 04:23:08 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:54368) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1m7ZPa-0002xP-Mi for guix-patches@gnu.org; Sun, 25 Jul 2021 04:23:02 -0400 Received: from debbugs.gnu.org ([209.51.188.43]:36002) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1m7ZPa-0004yY-EV for guix-patches@gnu.org; Sun, 25 Jul 2021 04:23:02 -0400 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1m7ZPa-0002Yc-CF for guix-patches@gnu.org; Sun, 25 Jul 2021 04:23:02 -0400 X-Loop: help-debbugs@gnu.org Subject: [bug#49280] [PATCH v2 1/3] gnu: racket: Update to 8.2. Resent-From: Philip McGrath Original-Sender: "Debbugs-submit" Resent-CC: guix-patches@gnu.org Resent-Date: Sun, 25 Jul 2021 08:23:02 +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: Leo Prikler , 49280@debbugs.gnu.org Received: via spool by 49280-submit@debbugs.gnu.org id=B49280.16272013349762 (code B ref 49280); Sun, 25 Jul 2021 08:23:02 +0000 Received: (at 49280) by debbugs.gnu.org; 25 Jul 2021 08:22:14 +0000 Received: from localhost ([127.0.0.1]:47548 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1m7ZOn-0002XO-Hr for submit@debbugs.gnu.org; Sun, 25 Jul 2021 04:22:14 -0400 Received: from mail-qk1-f181.google.com ([209.85.222.181]:40870) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1m7ZOk-0002X9-KF for 49280@debbugs.gnu.org; Sun, 25 Jul 2021 04:22:12 -0400 Received: by mail-qk1-f181.google.com with SMTP id z24so5815841qkz.7 for <49280@debbugs.gnu.org>; Sun, 25 Jul 2021 01:22:10 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=philipmcgrath.com; s=google; h=from:subject:to:references:message-id:date:user-agent:mime-version :in-reply-to:content-language:content-transfer-encoding; bh=1kMBcXXsoyitCHX/SZGDFirMPRY01EfvFy4w2YMcRXk=; b=FpDI9e8B2l6TctfTfByEpBa1GyLjI8mpGCzlUgbgx8EsjFgyGBci1DEcK+ZE7/56Ff Ugt05zvECJY7Fl1pjZOFqSL2N8ARihDEp8xBEKLOGiDkk7N2VcArOvfGo3rx6ughCmo2 nFCBzLu3Kn++ohg/5+1Iagx52q9pf0SjJsVmpfAWffVlnDOakrLQGyZD1QHQdTBYu7uW 3jMXP8mR3Dq8LimYWN1F6y6XBDLaE0DcO4R2UU+1DD0CLi4jmDok6YiaMgU1Pd4gGuDN cUQBPLPzmEo/uohCkdfl4uJaajScnfXhiBLx5hn0n3aTlckFjHtTvQQ2Pf5fMWUIZG5x mJ/w== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:subject:to:references:message-id:date :user-agent:mime-version:in-reply-to:content-language :content-transfer-encoding; bh=1kMBcXXsoyitCHX/SZGDFirMPRY01EfvFy4w2YMcRXk=; b=lEPRqsCjRwhE1mwrWRyvendwlnTy4O5KJ0adDLO2owxJLkgrYwwOx/JDWQIkKe/YI1 pIehgh9supFox52M6TxwdxQnSo98/n7ws5JGUddZs50DlLBxWkBQqHdPR0SCTg84YOS8 m4EgY3vsgJkxtAtvz1wRALnqMAfmR4iAtPEv8zbqJ9zoPYeng8teMsYRiLhciDDS4Tly XbHXabbPvm8OihQv25+TzXEMZay7AfCIzfZtmtoNNXeR0BdcsvqobOb5fly3d6tfIg3V yd8s3isfmIQ+6XNFkukVrvU5DkEIZpqJzN1/CPtHC5SIqOEva1Pdjt9ZFKBluvtaoYj/ UvHg== X-Gm-Message-State: AOAM5323ph4mtl8SqzBYmkXeuydGrlYYkv3P2mgBliJWtuPeQ5Unf+n9 9fP4bhck+eoiGTVHpA7LM5KcJQx2B6NmeOqHUaE= X-Google-Smtp-Source: ABdhPJxv0Z1fjLSU/nwz2bl76Ov9T48ZJgaPKiz/7+yqc7Qh0rxFgfWyfbvBjUpVO96PUX8xOZrssQ== X-Received: by 2002:a37:a147:: with SMTP id k68mr820032qke.196.1627201324895; Sun, 25 Jul 2021 01:22:04 -0700 (PDT) Received: from [192.168.45.37] (c-73-125-89-242.hsd1.fl.comcast.net. [73.125.89.242]) by smtp.gmail.com with ESMTPSA id l11sm17439414qke.23.2021.07.25.01.22.04 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Sun, 25 Jul 2021 01:22:04 -0700 (PDT) From: Philip McGrath References: <270db91e-24f6-2754-7164-d0406aeebc60@philipmcgrath.com> <20210719063143.788661-1-philip@philipmcgrath.com> <552707abf1fdcba6de34fbb5a5466dea31c8417a.camel@student.tugraz.at> <95998dae5aec25fed80dd1e5a3808167796282ae.camel@student.tugraz.at> Message-ID: <94d8a86a-dca6-46a5-0c5e-fd82a6cd6397@philipmcgrath.com> Date: Sun, 25 Jul 2021 04:22:03 -0400 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:78.0) Gecko/20100101 Thunderbird/78.11.0 MIME-Version: 1.0 In-Reply-To: <95998dae5aec25fed80dd1e5a3808167796282ae.camel@student.tugraz.at> Content-Type: text/plain; charset=utf-8; format=flowed Content-Language: en-US Content-Transfer-Encoding: 7bit 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=1627201390; h=from:from:sender:sender:reply-to:subject:subject:date:date: message-id:message-id:to:to: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=1kMBcXXsoyitCHX/SZGDFirMPRY01EfvFy4w2YMcRXk=; b=VS+ue0yxUL+tD+hLt1uq9JiZ68JGg91E4+L6okaWnc43nVJTnQUTsdWn1zOmy5xEPrV/JH rHsqhnUto0Xv6OlQEFtcTQWkwfwHTrs/2xsvvH70AwmAn+ycUvlchLGevz0aajYQO3c0yG aWYDPUktv8QUr89qdp5nZ98efvk3wwJjGbCzpAXMNmr2i4a+LGTHMwFaiEl/QB/yN66tP3 Vn3KfR5peiyw1RZiDJw+ezRtU8Y2bRiBErxlKrlbdYhlV0jP0nN6CQ/2/H/X3N2imPU/cH PW18Upj/LGQE3F+OCEwyFs1v0fas1c43YVEcF6DV1Px9uviJ+orchxDQ/liHTg== ARC-Seal: i=1; s=key1; d=yhetil.org; t=1627201390; a=rsa-sha256; cv=none; b=K6+/KAcobR9JVTdqNNNFlRnRUaZm6JQoIm1HftHTAp8W/fMqEEKso6YcNrzSo+IM3Mlm0b gp+Jdv5Ct/bmGx7eTmreqOlpBPZGH+y3aQJOCZSn1bi5Dzq3auAgCcaMNMoKQO1JpYR758 KPcJPNkHKlOy1jVy//DP2oPu1++sdZnUN4WQvIMFXyvzckEPKWAxR9z9a9Pj65FkBxb1FF crEYxl4qStrMsoz9s2LDdtL6vpVUCo98rJmaed774J4DTxuENhQI2fqA8JIg4SER4yyRbj cJgkg6E0EGrQv54jyvVuR3oOM1FjkW5J2cj/sOrjDIh2uHW8p3HKrbEMjE9m/Q== ARC-Authentication-Results: i=1; aspmx1.migadu.com; dkim=fail ("headers rsa verify failed") header.d=philipmcgrath.com header.s=google header.b=FpDI9e8B; dmarc=none; 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: -1.42 Authentication-Results: aspmx1.migadu.com; dkim=fail ("headers rsa verify failed") header.d=philipmcgrath.com header.s=google header.b=FpDI9e8B; dmarc=none; 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: E472636F7 X-Spam-Score: -1.42 X-Migadu-Scanner: scn1.migadu.com X-TUID: 6FsGoxQNMKwi On 7/20/21 5:40 AM, Leo Prikler wrote: > Am Montag, den 19.07.2021, 17:46 -0400 schrieb Philip McGrath: >> As you'd probably guess, `lib-search-dirs` and other `-search-dirs` >> "config.rktd" entries specify search paths. The `#f` value is used >> to >> specify the point at which the default search path should be spliced >> into the list: a configuration file can ignore the default altogether >> or >> exercise fine-grained control over the search order. Using `#f` also >> helps to maintain something closer to a single point of control, >> rather >> than hard-code the same string constants in several places. > Okay, but for this specific config, we could still splice #f ourselves > (particularly to also get full store paths), or can we not thanks to > the non-constant nature of #f? > >> Most importantly, the default value is not always a constant: for >> example, command-line flags and Racket parameters control whether >> user-specific paths are included. > How exactly would this play out? Would for example one version of #f > contain all of the user-installed packages in ~/.guix-profile whereas > the other would only contain racket's own path? > >> (For `lib-search-dirs` in particular, it's also worth noting that >> these are Racket-specific search directories: it does not control the >> use of OS-level defaults for e.g. `dlopen`.) > Perhaps a confusing naming scheme, but okay. The short answer is that I don't think including #f is causing any problems, whereas trying not to include it seems likely to cause a variety of problems. I'll try to explain more clearly. It might be more useful to look at the second patch in the series, which uses the "extend-layer.rkt" script to generate a "config.rkt" file for the `racket` package, and especially the third patch, which replaces this code completely for the `racket-minimal` package: On 7/19/21 2:31 AM, Philip McGrath wrote: > + (add-before 'configure 'initialize-config.rktd > (lambda* (#:key inputs #:allow-other-keys) > - (chdir "src") > + (define (write-racket-hash alist) > + ;; inside must use dotted pair notation > + (display "#hash(") > + (for-each (match-lambda > + ((k . v) > + (format #t "(~s . ~s)" k v))) > + alist) > + (display ")\n")) > + (mkdir-p "racket/etc") > + (with-output-to-file "racket/etc/config.rktd" > + (lambda () > + (write-racket-hash > + `((lib-search-dirs > + . (#f ,@(map (lambda (lib) > + (string-append (assoc-ref inputs lib) > + "/lib")) > + '("openssl" > + "sqlite")))) > + (catalogs > + . (,(string-append > + "https://download.racket-lang.org/releases/" > + ,version > + "/catalog/") > + #f)))))) > #t)) This code creates a template "config.rktd" file used in the build process: the distributed source tarballs contain such a template already, which is why we didn't need explicitly configure `catalogs` to add the release-pinned package catalog until this change. It is added before the `#f` so that the release catalog is checked before the default catalogs (which point to the latest sources). For `lib-search-dirs`, on the other hand, we want Racket-specific library paths to be tried first, and indeed for layers of a Racket installation to be searched in order, so `#f` is at the head of the list. The Racket build process extends the template "config.rktd" file based on build options like the `--prefix` passed to `configure`. For example, it configures `lib-dir` to "lib/racket" within the store output directory. (It would be incorrect to set those values in the template "config.rktd" file because it is used in the build process before installation.) The `#f` entry in `lib-search-dirs` is usually replaced by a user-specific path like "/home/philip/.local/share/racket/8.1/lib" and the installation-wide path specified by the `lib-dir` key, unless one or both are changed. Omitting the `#f` entry means that neither of paths are ever included. I don't know of any real-life circumstance in which one would want such a "config.rktd" file. In particular, missing `#f` entries creates problems for layered installations, which use these search paths to find earlier layers. There are some other configuration possibilities we may want to explore as Guix's support for Racket packages improves, such as "addon" tethering and customizing the "installation name" or "build stamp". However, this patch series does not attempt to change how Guix's Racket packages work, other than correcting the error I introduced in . Racket installed via Guix has the same behavior in this respect as Racket installed via Debian or other package managers, and that's a way of using Racket I think Guix will want to continue to support. -Philip