From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Amirouche Newsgroups: gmane.lisp.guile.bugs Subject: bug#66046: Relative includes in R7RS define-library seem broken Date: Sat, 11 Nov 2023 11:58:49 +0000 Message-ID: <3jwzxtCW91bvW_AqM4x1Xpm-kdOmiBYvVFfKneO0-Ls556aEA5wWugMgOShhtaP0cpfvxta2wcuqZX3jSelpVE4QpmTo2zjX92QQ5owzp04=@hyper.dev> 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="3685"; mail-complaints-to="usenet@ciao.gmane.io" To: "66046@debbugs.gnu.org" <66046@debbugs.gnu.org> Original-X-From: bug-guile-bounces+guile-bugs=m.gmane-mx.org@gnu.org Sat Nov 11 12:59:43 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 1r1meM-0000nc-J5 for guile-bugs@m.gmane-mx.org; Sat, 11 Nov 2023 12:59:42 +0100 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1r1me4-00071i-PI; Sat, 11 Nov 2023 06:59:24 -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 1r1me2-00071P-LW for bug-guile@gnu.org; Sat, 11 Nov 2023 06:59:22 -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 1r1me2-00025v-D9 for bug-guile@gnu.org; Sat, 11 Nov 2023 06:59:22 -0500 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1r1meg-0007EH-MD for bug-guile@gnu.org; Sat, 11 Nov 2023 07:00:02 -0500 X-Loop: help-debbugs@gnu.org In-Reply-To: <6C8500AC-6352-4849-A2C9-2DFEB34F21D5@nonceword.org> Resent-From: Amirouche Original-Sender: "Debbugs-submit" Resent-CC: bug-guile@gnu.org Resent-Date: Sat, 11 Nov 2023 12:00: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.169970399227747 (code B ref 66046); Sat, 11 Nov 2023 12:00:02 +0000 Original-Received: (at 66046) by debbugs.gnu.org; 11 Nov 2023 11:59:52 +0000 Original-Received: from localhost ([127.0.0.1]:52238 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1r1meW-0007DS-AC for submit@debbugs.gnu.org; Sat, 11 Nov 2023 06:59:52 -0500 Original-Received: from mail-4323.proton.ch ([185.70.43.23]:38637) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1r1meR-0007DC-TL for 66046@debbugs.gnu.org; Sat, 11 Nov 2023 06:59:50 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=hyper.dev; s=protonmail2; t=1699703939; x=1699963139; bh=H6ubGdfD8/rGRmzpY5ETyA12MBkgHbHw4gKBgsejnpI=; h=Date:To:From:Subject:Message-ID:Feedback-ID:From:To:Cc:Date: Subject:Reply-To:Feedback-ID:Message-ID:BIMI-Selector; b=Ps0yjLE3ilbxhIpJTf9nkzm92s/V/+XhmxiEysLICOHMVr8h/Rx4qb3DhyNioQ9sb yDpieNBM6YeZCT7OwHtsjrk257Cnwyl4rCDy9jBRrF6obL9g66xD21W5GmWg25m1qP XGEMgiQ2SkGwRHifJbAsapdsYgEQW2fNDt+JBE+Rit06oEpZTFDveyNlyqvHX9L1U6 OzPXT7MWJ9wMwSpwc86HrLLQ0Fg/JGdYyWFxbghhVjt6QfJDkaeg40HGSY1/unDgCf sPuOJ9eeReXzJsrxZ8QvjPTp1ST/UHIfsXD5yb8msHVgVnCvB+G9htwkkj3ZatcV7Z 6Kgm5xgj1Mjxg== Feedback-ID: 39575501:user:proton 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:10697 Archived-At: If I am not mistaken, the patch is not backward compatible. The problem with the current patch is that it force the included file=20 to be next to the including file, there is no fallback mechanism.=20 The algorithm should be dynamic using an ordered list a priority to the favorite behavior.=20 The most relevant hunk is: --- a/module/ice-9/psyntax.scm +++ b/module/ice-9/psyntax.scm @@ -3260,15 +3260,20 @@ (let ((syntax-dirname (lambda (stx) (define src (syntax-source stx)) (define filename (and src (assq-ref src 'filenam= e))) - (and (string? filename) - (dirname filename))))) + (define source-file-name + (fluid-ref compilation-source-file-name)) + (or (and source-file-name + (dirname source-file-name)) + (and (string? filename) + (dirname filename)))))) Here the code says: the included file must be in (syntax-dirname).=20 It is preferable to have fallbacks, to be backward compatible. `syntax-dirname' must be `syntax-dirnames' to return candidate directories= =20 sorted list with biggest priority coming first where to find included=20 files. Also, mind the use of the fluid and how it interact with parallel compilati= on. BR ref: https://github.com/justinethier/cyclone/issues/494#issuecomment-132895= 8946 ref: https://github.com/justinethier/cyclone/commit/ab25e360a9d7b67c2e5eda0= 86001ca0761a3f34f#diff-b9136575f3ccbf09887d1da9fb4b6e136e4e32a839c10cf85569= 6ec1cf6add4bR54-R58