From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mp0 ([2001:41d0:2:bcc0::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by ms0.migadu.com with LMTPS id fK54IoZh/WACUgEAgWs5BA (envelope-from ) for ; Sun, 25 Jul 2021 15:05: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 mp0 with LMTPS id qDOnHYZh/WCpYgAA1q6Kng (envelope-from ) for ; Sun, 25 Jul 2021 13:05: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 8B4E7646F for ; Sun, 25 Jul 2021 15:05:09 +0200 (CEST) Received: from localhost ([::1]:39160 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1m7doa-000808-Lm for larch@yhetil.org; Sun, 25 Jul 2021 09:05:08 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:56090) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1m7doT-0007zn-W0 for guix-patches@gnu.org; Sun, 25 Jul 2021 09:05:02 -0400 Received: from debbugs.gnu.org ([209.51.188.43]:36250) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1m7doT-0000AV-OZ for guix-patches@gnu.org; Sun, 25 Jul 2021 09:05:01 -0400 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1m7doT-0003am-Ke for guix-patches@gnu.org; Sun, 25 Jul 2021 09:05:01 -0400 X-Loop: help-debbugs@gnu.org Subject: [bug#49280] [PATCH v2 1/3] gnu: racket: Update to 8.2. Resent-From: Leo Prikler Original-Sender: "Debbugs-submit" Resent-CC: guix-patches@gnu.org Resent-Date: Sun, 25 Jul 2021 13:05: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 , 49280@debbugs.gnu.org Received: via spool by 49280-submit@debbugs.gnu.org id=B49280.162721826113747 (code B ref 49280); Sun, 25 Jul 2021 13:05:01 +0000 Received: (at 49280) by debbugs.gnu.org; 25 Jul 2021 13:04:21 +0000 Received: from localhost ([127.0.0.1]:47793 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1m7dnj-0003ZY-GO for submit@debbugs.gnu.org; Sun, 25 Jul 2021 09:04:21 -0400 Received: from mailrelay.tugraz.at ([129.27.2.202]:53034) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1m7dnd-0003ZK-M6 for 49280@debbugs.gnu.org; Sun, 25 Jul 2021 09:04:13 -0400 Received: from [10.0.0.4] (80-121-26-175.adsl.highway.telekom.at [80.121.26.175]) by mailrelay.tugraz.at (Postfix) with ESMTPSA id 4GXjtT58Pqz1LLyW; Sun, 25 Jul 2021 15:04:01 +0200 (CEST) DKIM-Filter: OpenDKIM Filter v2.11.0 mailrelay.tugraz.at 4GXjtT58Pqz1LLyW DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=tugraz.at; s=mailrelay; t=1627218241; bh=fyCVX6nJ9DpIb4eub5iCvIyLKNy7pJoIuVzwrJJMmvQ=; h=Subject:From:To:Date:In-Reply-To:References:From; b=oMetHYE2h6ArobJmmjzM4b/tkcd50r741KSEMVcb+frKFVR74UK7men6Y48V4QkN1 uZtTKikYSfkPTU/cpnyvT+2atcgtJcRjs34TuzPt05TqlYCUnX0B63pHoZHZJfrJny W84ZNc2SsTquN/y6I7GUPkAM8L8xvVLcJeJUkJn8= Message-ID: <45fc43e2ceba9e6a711fe1bb99320875f2b45f44.camel@student.tugraz.at> From: Leo Prikler Date: Sun, 25 Jul 2021 15:03:35 +0200 In-Reply-To: <94d8a86a-dca6-46a5-0c5e-fd82a6cd6397@philipmcgrath.com> References: <270db91e-24f6-2754-7164-d0406aeebc60@philipmcgrath.com> <20210719063143.788661-1-philip@philipmcgrath.com> <552707abf1fdcba6de34fbb5a5466dea31c8417a.camel@student.tugraz.at> <95998dae5aec25fed80dd1e5a3808167796282ae.camel@student.tugraz.at> <94d8a86a-dca6-46a5-0c5e-fd82a6cd6397@philipmcgrath.com> Content-Type: text/plain; charset="UTF-8" User-Agent: Evolution 3.34.2 MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-TUG-Backscatter-control: bt4lQm5Tva3SBgCuw0EnZw X-Spam-Scanner: SpamAssassin 3.003001 X-Spam-Score-relay: -1.9 X-Scanned-By: MIMEDefang 2.74 on 129.27.10.117 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=1627218310; 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=fyCVX6nJ9DpIb4eub5iCvIyLKNy7pJoIuVzwrJJMmvQ=; b=RyvsThf8vSZxPZ46JR9i/nNom/e+ztaNgT7F0+qFMXPK2iNOSrtHSjZJwNbtsxhTkVR6vb KbEVEooVFezVeyWrx7C76jLPdVKPuU0c3o6rbqPx4+XIrYt6xJfgSsrEwW4ztMVf8nQYoP n6NJ847VTUgtE2nX+pPhGByzsHOfAb0wxsik7QT0ZE8q0gzaktbA05D3ulfYUB85hrnTeo LTdfTiyq8kBmCOop53M+kHzGsp2WyEXNo35dFTldEmjHvk6beQWJjnX28lpqcoi8lodLtF pDyiGV9dB+QUJs4gReXxBDZJ3RAvA60zTOheXdsY/czBSxHG/XiZAWOeEta9lg== ARC-Seal: i=1; s=key1; d=yhetil.org; t=1627218310; a=rsa-sha256; cv=none; b=PavGE8smXqtme4VPgi986Pbk6+lFqmPKdE+gHHXcFwIv0f2QSxGmZflHPcuzEvdFb5vwxH +OT6DyJ1eB2W5FDYJ+2f0xwc/KEYY1wzhQrSTuIOy0RJAWgxyMeVWfj9nDyUmG1OYDYP56 Hc85DA3TBqLleT2xIBai8NBjQ9kxwQ+csQoNqrpPFbmZr525nnEakGcXlaTY4pf4Ly5B8o odAQow7IOkjZVJnpri+CynzKpdQJ7PPs0wWH1vfdbSvrLfmEJw4g/pquy/mPcHbxARNbte ZynWnYzX9xEPgVwLIGSIJE7HlCyrdIJ8Ox93Zxzt3tfnGoNrbIYSU7c2BatW3A== ARC-Authentication-Results: i=1; aspmx1.migadu.com; dkim=fail ("headers rsa verify failed") header.d=tugraz.at header.s=mailrelay header.b=oMetHYE2; dmarc=fail reason="SPF not aligned (relaxed)" header.from=student.tugraz.at (policy=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.32 Authentication-Results: aspmx1.migadu.com; dkim=fail ("headers rsa verify failed") header.d=tugraz.at header.s=mailrelay header.b=oMetHYE2; dmarc=fail reason="SPF not aligned (relaxed)" header.from=student.tugraz.at (policy=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: 8B4E7646F X-Spam-Score: -1.32 X-Migadu-Scanner: scn1.migadu.com X-TUID: Uys1mHBha/2l Hi Philip, Am Sonntag, den 25.07.2021, 04:22 -0400 schrieb Philip McGrath: > 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. That short explanation imo doesn't adequately summarize the long one. Rest assured, the long explanation gives us a good reason to use #f as you did, it's just that the way to reach this point of understanding appears a bit of a long one. > 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 is perhaps a somewhat noobish question, but why must we use dotted pair notation here? To me personally, reading '(a . (b c)) is confusing as it could more clearly be written as '(a b c). Is this a Racket convention? > 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. To attempt a better summary: Specifying `#f' will allow Racket to search for user-specific libraries etc. (in $XDG_DATA_HOME/racket/$RACKET_VERSION) in addition to "system-specific" libraries stored in $HOME/.guix-profile, am I correct? If so, then yes, doing that is absolutely fine (you could compare it to how Emacs users can still install stuff via ELPA). Regards,