From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Timothy Sample Newsgroups: gmane.lisp.guile.bugs Subject: bug#66046: Relative includes in R7RS define-library seem broken Date: Mon, 06 Nov 2023 12:31:28 -0600 Message-ID: <87cywmzqbj.fsf@ngyro.com> References: <6C8500AC-6352-4849-A2C9-2DFEB34F21D5@nonceword.org> Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="8171"; mail-complaints-to="usenet@ciao.gmane.io" User-Agent: Gnus/5.13 (Gnus v5.13) Cc: 66046@debbugs.gnu.org To: Daphne Preston-Kendal Original-X-From: bug-guile-bounces+guile-bugs=m.gmane-mx.org@gnu.org Mon Nov 06 19:32:57 2023 Return-path: Envelope-to: guile-bugs@m.gmane-mx.org Original-Received: from lists.gnu.org ([209.51.188.17]) by ciao.gmane.io with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1r04P9-0001ml-8E for guile-bugs@m.gmane-mx.org; Mon, 06 Nov 2023 19:32:56 +0100 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1r04Ot-00078U-Pq; Mon, 06 Nov 2023 13:32:39 -0500 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1r04Ol-000787-JT for bug-guile@gnu.org; Mon, 06 Nov 2023 13:32:34 -0500 Original-Received: from debbugs.gnu.org ([2001:470:142:5::43]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1r04Of-0006JJ-0d for bug-guile@gnu.org; Mon, 06 Nov 2023 13:32:30 -0500 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1r04PG-0007Wa-7U for bug-guile@gnu.org; Mon, 06 Nov 2023 13:33:02 -0500 X-Loop: help-debbugs@gnu.org Resent-From: Timothy Sample Original-Sender: "Debbugs-submit" Resent-CC: bug-guile@gnu.org Resent-Date: Mon, 06 Nov 2023 18:33:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 66046 X-GNU-PR-Package: guile Original-Received: via spool by 66046-submit@debbugs.gnu.org id=B66046.169929553728871 (code B ref 66046); Mon, 06 Nov 2023 18:33:02 +0000 Original-Received: (at 66046) by debbugs.gnu.org; 6 Nov 2023 18:32:17 +0000 Original-Received: from localhost ([127.0.0.1]:40701 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1r04OX-0007Vb-8z for submit@debbugs.gnu.org; Mon, 06 Nov 2023 13:32:17 -0500 Original-Received: from out3-smtp.messagingengine.com ([66.111.4.27]:38293) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1r04OU-0007VL-I3 for 66046@debbugs.gnu.org; Mon, 06 Nov 2023 13:32:15 -0500 Original-Received: from compute1.internal (compute1.nyi.internal [10.202.2.41]) by mailout.nyi.internal (Postfix) with ESMTP id 461DC5C00E9; Mon, 6 Nov 2023 13:31:31 -0500 (EST) Original-Received: from mailfrontend1 ([10.202.2.162]) by compute1.internal (MEProxy); Mon, 06 Nov 2023 13:31:31 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=ngyro.com; h=cc :cc:content-transfer-encoding:content-type:content-type:date :date:from:from:in-reply-to:in-reply-to:message-id:mime-version :references:reply-to:sender:subject:subject:to:to; s=fm2; t= 1699295491; x=1699381891; bh=+2gndDz7jKuD0e7fRwUqu1ddoQFxHB+0rMF Rt45VLZI=; b=g12eGztLpUElW505YGDf/0IEzMDgrsN09yDhoCY/2QN8RcKGFLB wooRCp/p/VOvdZ4x1n4IlXVU/ofBa6z1jRUnYdvpMnVO20fudgaNxakm98GI8kSi dOpO5i+Uro9rSv9mgLw0wsEmfD8RmsOcWu3oTDi8rf5lSBm2XZharRttulAdQ1vw vlzBvKIv9bknNGoGE31pxbvlCo3EjRbR81pzGLAJrjQWiUhv/k80cc/8CUFNW/Ag pk+bITYWh/IuQ3CJP2HY3OUca4GYxqd3m8d4JscqKEwKLpOV0FdxVIYwl00Z3M60 6O9QnhCT8qSPZJ3UzWBw72o99IyRuse6BNw== DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= messagingengine.com; h=cc:cc:content-transfer-encoding :content-type:content-type:date:date:feedback-id:feedback-id :from:from:in-reply-to:in-reply-to:message-id:mime-version :references:reply-to:sender:subject:subject:to:to:x-me-proxy :x-me-proxy:x-me-sender:x-me-sender:x-sasl-enc; s=fm3; t= 1699295491; x=1699381891; bh=+2gndDz7jKuD0e7fRwUqu1ddoQFxHB+0rMF Rt45VLZI=; b=RWHMQuO+woMoLAwHDLoA4HEx7yNt1NE4ZVlLdKBAYQQmWTiyPor FU8mxQQDjjVBF/OeLjSG4l/WMBa97x/j60JkCoXpY2OwWwS2rkSi1dphteqHOcBD DgFukU311xuUh3bzY2VyF4ljvDRKQF19fbylRzYCQpNzlcGVAzg8fDyPo92xQqGp uvT3cP5QzvTHMMV0J2VNspgwXyuXYohCDZEcYNSj+a85H9WbfrVS5JUaJ0DY4qJZ OQLDMNgAFuyND2DFGMEiipCZgT66AUliiHlOaJiu0+8y8lc8KQwZpJT9JEuH/71p intyxu14rNTONkT6WTg5euxLeXIFLv0XTbQ== X-ME-Sender: X-ME-Received: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgedvkedruddugedgudduvdcutefuodetggdotefrod ftvfcurfhrohhfihhlvgemucfhrghsthforghilhdpqfgfvfdpuffrtefokffrpgfnqfgh necuuegrihhlohhuthemuceftddtnecunecujfgurhephffvvefujghffffkfgggtgfgse htqhertddtreejnecuhfhrohhmpefvihhmohhthhihucfurghmphhlvgcuoehsrghmphhl vghtsehnghihrhhordgtohhmqeenucggtffrrghtthgvrhhnpeetfeffffettdelveekgf effeevudehhedtffdvfffhudethfefvdduudejlefhvdenucevlhhushhtvghrufhiiigv pedtnecurfgrrhgrmhepmhgrihhlfhhrohhmpehsrghmphhlvghtsehnghihrhhordgtoh hm X-ME-Proxy: Feedback-ID: i4721425c:Fastmail Original-Received: by mail.messagingengine.com (Postfix) with ESMTPA; Mon, 6 Nov 2023 13:31:30 -0500 (EST) In-Reply-To: <6C8500AC-6352-4849-A2C9-2DFEB34F21D5@nonceword.org> (Daphne Preston-Kendal's message of "Sun, 17 Sep 2023 10:22:20 +0200") X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-BeenThere: bug-guile@gnu.org List-Id: "Bug reports for GUILE, GNU's Ubiquitous Extension Language" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: bug-guile-bounces+guile-bugs=m.gmane-mx.org@gnu.org Original-Sender: bug-guile-bounces+guile-bugs=m.gmane-mx.org@gnu.org Xref: news.gmane.io gmane.lisp.guile.bugs:10687 Archived-At: Hi Daphne, Daphne Preston-Kendal writes: > A standard layout for R7RS libraries is to have an .sld file > containing the library import and export declarations with a parallel > .scm file with the same name in the same directory, which the .sld > file (include ...)s. > > [...] > > Guile supports looking for .sld files before .scm files if started in > --r7rs mode. However, in this case, it will not find the .scm file if > it=E2=80=99s included from the .sld file. This is currently causing me problems, too, so I will look into writing and submitting a patch. We are technically following R7RS, which says the lookup strategy is =E2=80=9Cimplementation-specific=E2=80=9D. However, it goes on to say: =E2= =80=9Cimplementations are encouraged to search for files in the directory which contains the including file [...].=E2=80=9D This is perfectly reasonable, and like you = say, part of an established pattern for portable code. > Changing the path in the include declaration to be absolute fixes the > problem, but then it no longer works on other people=E2=80=99s machines. FWIW, I=E2=80=99ve settled on this (annoying) pattern for now: (cond-expand (guile (import (only (guile) include-from-path)) (begin (include-from-path "relative/from/load/path/foo.scm"))) (else (include "foo.scm"))) I wouldn=E2=80=99t bother with it if I weren=E2=80=99t committed to Guile, = though! -- Tim