From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Vijay Marupudi Newsgroups: gmane.lisp.guile.bugs Subject: bug#49452: Confusing behavior with (include) used in file in GUILE_LOAD_PATH Date: Thu, 8 Jul 2021 23:08:12 -0500 Message-ID: <890ae165-150b-8f5a-63ea-2ee4247f6d0f@gatech.edu> References: <7b37a89f-39a6-1433-daf4-469a40656a6b@gatech.edu> <20210707212256.GA2266@LionPure> Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="33383"; mail-complaints-to="usenet@ciao.gmane.io" User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:78.0) Gecko/20100101 Thunderbird/78.11.0 Cc: 49452@debbugs.gnu.org To: Bengt Richter Original-X-From: bug-guile-bounces+guile-bugs=m.gmane-mx.org@gnu.org Fri Jul 09 06:09:09 2021 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 1m1hp5-0008PF-Tg for guile-bugs@m.gmane-mx.org; Fri, 09 Jul 2021 06:09:09 +0200 Original-Received: from localhost ([::1]:37968 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1m1hp4-00037R-TC for guile-bugs@m.gmane-mx.org; Fri, 09 Jul 2021 00:09:06 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:51350) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1m1hp0-00037H-CN for bug-guile@gnu.org; Fri, 09 Jul 2021 00:09:02 -0400 Original-Received: from debbugs.gnu.org ([209.51.188.43]:46503) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1m1hp0-0001DC-4j for bug-guile@gnu.org; Fri, 09 Jul 2021 00:09:02 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1m1hoz-0000jY-Rq for bug-guile@gnu.org; Fri, 09 Jul 2021 00:09:01 -0400 X-Loop: help-debbugs@gnu.org Resent-From: Vijay Marupudi Original-Sender: "Debbugs-submit" Resent-CC: bug-guile@gnu.org Resent-Date: Fri, 09 Jul 2021 04:09:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 49452 X-GNU-PR-Package: guile Original-Received: via spool by 49452-submit@debbugs.gnu.org id=B49452.16258037032772 (code B ref 49452); Fri, 09 Jul 2021 04:09:01 +0000 Original-Received: (at 49452) by debbugs.gnu.org; 9 Jul 2021 04:08:23 +0000 Original-Received: from localhost ([127.0.0.1]:58049 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1m1hoN-0000ie-H9 for submit@debbugs.gnu.org; Fri, 09 Jul 2021 00:08:23 -0400 Original-Received: from mail-co1nam11on2134.outbound.protection.outlook.com ([40.107.220.134]:65440 helo=NAM11-CO1-obe.outbound.protection.outlook.com) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1m1hoL-0000iR-Id for 49452@debbugs.gnu.org; Fri, 09 Jul 2021 00:08:22 -0400 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=DM3fJ2fYa/Z5XsMwc4fJc85Pl0ld9EziP+l9O6R3Ke4479jd8w51Tq07fKxfrXvITFL/ZDxoTZ4YacCAJyZDupoCpG20f80oIPpkY0hEnpuVc63kBi6vNM1r1AacgyS+w3Yib8LoQXevBAuULROF+XlI3Vp42XqfALThrhEZpmxLrVnad4F42JBs4rmlpt5GiktAVUxet7aUyjJKsUDGKfkxQPgQNc5kM3WKK3iiV57UIQxduN4LqbC9ZY5n6pe70FhcqWvyBYAI5etC73iW7lVgU5BwiJA8jhjRqqqYus0Uud9RxQa0cLmVdCXfJRJExz4nxs1ysBTE8lsyk+9GNQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector9901; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=m06ZjE/5rxUz3gR9o0B9QuVtP7oRtA5HPULuurpl52k=; b=nk/P40IaFq0ogzxWCxTqm29Od4EgEqc8SqN5HWgQlft/F6mra9m/I/liaB6P1NJPOS5VMIm+evGeqyZrfhQhb9v7b8kj3miYaYaf59EN/k9UGnAbk8l/l69CL1uD06z045GSsYfLKfGC0QWZMUr/0vl7lhZPI0J0tvBAKMyXBdMshxWufXGgu/bVWm2+9z8WJjYY6z42nKO/NqeGPzSOv7Styt8dQ7lRVAD09T3iACT8cbkQLdb1pXZOCUH3aa0vS5aYVd45TlbIMF+LVWJzGDxWU3tu56Ns8LZXDlANXIvfwfPENfeJSVMKP3QFUrBWlK3K7U9piakalzyE2UHfsg== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=gatech.edu; dmarc=pass action=none header.from=gatech.edu; dkim=pass header.d=gatech.edu; arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gatech.edu; s=selector1; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=m06ZjE/5rxUz3gR9o0B9QuVtP7oRtA5HPULuurpl52k=; b=owO6AEqhW5gFNMS+uyOlWq9Eljri6KskyhHdmfEJfQAV8TXToBeQG3hfUCTue4aHpMHvbYgiPxSooPIj8L1/dYKzdZBmNmD1YuHIfu9omll1mRij/0srrnWzCXBOhR9jrA5t67fLc5mgq50J+kWCPisoZJSlFVH0Sna9sFiALyI= Authentication-Results: debbugs.gnu.org; dkim=none (message not signed) header.d=none; debbugs.gnu.org; dmarc=none action=none header.from=gatech.edu; Original-Received: from BN8PR07MB5793.namprd07.prod.outlook.com (2603:10b6:408:9c::19) by BN6PR07MB2786.namprd07.prod.outlook.com (2603:10b6:404:41::18) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.4287.31; Fri, 9 Jul 2021 04:08:14 +0000 Original-Received: from BN8PR07MB5793.namprd07.prod.outlook.com ([fe80::95ef:633a:4d50:42e4]) by BN8PR07MB5793.namprd07.prod.outlook.com ([fe80::95ef:633a:4d50:42e4%6]) with mapi id 15.20.4308.023; Fri, 9 Jul 2021 04:08:14 +0000 In-Reply-To: <20210707212256.GA2266@LionPure> Content-Language: en-US-large X-ClientProxiedBy: CH0PR07CA0012.namprd07.prod.outlook.com (2603:10b6:610:32::17) To BN8PR07MB5793.namprd07.prod.outlook.com (2603:10b6:408:9c::19) X-MS-Exchange-MessageSentRepresentingType: 1 Original-Received: from [192.168.1.45] (97.127.13.219) by CH0PR07CA0012.namprd07.prod.outlook.com (2603:10b6:610:32::17) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.4308.19 via Frontend Transport; Fri, 9 Jul 2021 04:08:13 +0000 X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id: cb812121-a042-4645-94fb-08d9428f2c26 X-MS-TrafficTypeDiagnostic: BN6PR07MB2786: X-Microsoft-Antispam-PRVS: X-GT-Tenant: 042d12d7-75fe-4547-b5b6-0573f80f829d X-MS-Oob-TLC-OOBClassifiers: OLM:9508; X-MS-Exchange-SenderADCheck: 1 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: 5dtOw9/PiA1SznaAR4feaE/wqePoCo206+1h1owDb6XD9kaal9GXLOHbGuOenc3qV7rP0kKIwhSV1/SSdGyS1pWdDHgdYGRucI0llkD/uUh5r/+BqwAxpjD0Z8jQqonNfzyELMgMw592QqNcJ72irry+wQfWxZ8jHqf/RVLLt8LiAmaKuYPsgjVQE1wo/SKqKvQb5mp9xjIqAMUFxBv/AUYqVRylcNoH9OFSJJ0jKYKddTOwuf8bgrkOOYOcUH5FDVCEotJoQ3tiOlA1rSApZAuihj23/poAYYrHWgN+Aa4xl8p0T5s3BlW+AKwHGS4lR1zPC7hMvLUM3IFb/vn8f0W0M10Fm7N8qLffqZVyiu+NZm4J5NXUHWIoydCVrQkbEeaua+y+Abg1oZ+/qgPLP4gHoY5Hd7fyjcorxSZoXs1ShJWkzqobRCpyHLKRoHC/rRZFI45Z+gjwK/Ac46jcvJKMrSYCmib1/C4Ly/2jxVA+HhYC/DOhihSllk0H9dChJq0MPPXOSpfAjqScjtDZPPUr/COCe6fXMBC2/CknA/Fxhsqrs/8mlVBdqOX6vdrvWK/PYtnfJwABX54Nuep5m7E+YjkI//tGT4a9rY0UBgKLNzpClgyPCfyGN50Y1CkTKsRm7eHfT5cAxsbwv9u4yANQUokEIFtUACyF5GXH7kZLjvuvmiUp5PHRsSLahgzrLPRKEhJdNGc83supmsNnppDIv2jN6pMbmqyYX88VxBeHro7+gHSHYVwG/hZss QVLG9/GaHhEQH4eYMcjMFidFsuMGQakCdm3u43sR2zpgm5eAgHqqUIcVjnpJtHSpXU1 X-Forefront-Antispam-Report: CIP:255.255.255.255; CTRY:; LANG:en; SCL:1; SRV:; IPV:NLI; SFV:NSPM; H:BN8PR07MB5793.namprd07.prod.outlook.com; PTR:; CAT:NONE; SFS:(4636009)(39860400002)(346002)(366004)(376002)(136003)(396003)(4326008)(5660300002)(66556008)(31686004)(66946007)(66476007)(2616005)(956004)(75432002)(786003)(316002)(26005)(16576012)(478600001)(53546011)(8676002)(83380400001)(38100700002)(86362001)(186003)(36756003)(31696002)(6916009)(2906002)(8936002)(6486002)(43740500002)(45980500001); DIR:OUT; SFP:1102; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: zhP/zUSVxRg4sO7qDjdqvUx+QgwihNHYEyhspMWKbNZ3zCtutTD7yK0Cclup7aWboYPToI5gf/T6MaIHvtjqU0Bjs7ARgjnhRd9A7gKnu4R41jIuyW9ZKubvYaGr2oxzwXGi96UUn1G2yClkFjuqW/ZRElBSSmxDX51cE9cFc7ujyjRgm8uH6zQrVBCB/wj3aTmn4QU2okuE79uNDwNGgGqoM3wkN1HPLTaxp7+AwYvnONoCegHvjnHk2o28YOB6gfBIsZOyGTUldWopcw2elTebzAxW4vMcI8dcN1+QMVv8YWx2Nv2jzDPLmY1SSyzz8hV5m2849my7Sl50ckhzRvoS/O51KFDFJEYO8tTm56Kn6PX7LfAcg7UogCtWUvH4+QtAs3tQpY2Qzx/irE3X6YuoQOq0+YZxm9h4OaZxGXltVdlHnTJ29CuWfBjxAt/ONtkfY3ZGcz0zXDCjsyOOCLjs/BoneusmKRxPseUyiByzD+rroqPcyHSGakFxf8sTeyRL7/qqvDHBNj1BrsVKf+wWlMQHg1pfGu1MnHlCfx8ssAt1Fb5OLos/VPO4gtnisAPOdZiucYI4H2wz9Xt1xPZwPt5gEEk5oEv6d88KR4a7DeEfFC6fzLmpGP/52B3mrpaoOqazHTGJw4MG0MLBVVfeVirWWWfqtMIgvzm0EU307Gm+ap2LJ1m/U57DRMrSpuefvuO1+H/T0LoTgBKyryzyVVV3F5xGaqA6e8YqNxAMkIzwRiKX6xYWKd umS3pdB/fzCVJl2gJWq+y9InBsVRDfxHvMWKL8U6pXzMKn0m8SeVU+rwiwPOpowJSO92NTG48dGRAGrWZHPORatUi9dW9bp46u X-OriginatorOrg: gatech.edu X-MS-Exchange-CrossTenant-Network-Message-Id: cb812121-a042-4645-94fb-08d9428f2c26 X-MS-Exchange-CrossTenant-AuthSource: BN8PR07MB5793.namprd07.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 09 Jul 2021 04:08:13.9617 (UTC) X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-CrossTenant-Id: 482198bb-ae7b-4b25-8b7a-6d7f32faa083 X-MS-Exchange-CrossTenant-MailboxType: HOSTED X-MS-Exchange-CrossTenant-UserPrincipalName: B4e/1v4O0FwmaHAq9y4JDTb4+DVFXmXnweVhx10epPWUh4NpSLJZc8vD8CCOCmaMU7fmQ9+6L/vMLpeUTap2xQ== X-MS-Exchange-Transport-CrossTenantHeadersStamped: BN6PR07MB2786 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" Xref: news.gmane.io gmane.lisp.guile.bugs:10142 Archived-At: Hello Bengt, Unfortunately that still doesn't work :( I think they should be considered the same though, when this bug gets fixed. Vijay On 7/7/21 4:22 PM, Bengt Richter wrote: > Hi Vijay, > > On +2021-07-06 19:31:38 -0500, Vijay Marupudi wrote: >> Hello all, >> >> It is unclear to me what the intended behavior for (include >> "filename.scm") is, so I'm sending an email about this potential bug. >> >> The Local Inclusion docs >> >> seem to state that relative paths are found relative to the file that >> included them. >> >>> If file-name is a relative path, it is searched for relative to the >>> path that contains the file that the include form appears in. >> >> So if I have a file "/libraries/libname/main.scm" than has (include >> "./helpers.scm"), then the file "/libraries/libname/helpers.scm" >> *should* (I think) be imported. >> > > A little nit, but > (include "filename.scm") > is not identical to > (include "./filename.scm") > so might it be worth trying > (include "helpers.scm") > in your code? > > And/or should the docs explain that both ways of writing a relative > file name in this context are or are not acceptable? > > Might some macro dislike leading dots? > > Long shot ;-) > >> But this does not seem to work if "/libraries" is in the GUILE_LOAD_PATH >> and my current working directory is somewhere else, say "/home/user" and >> I'm running "/home/user/program.scm" that imports the (libname main) >> library from "/libraries". Then Guile seems to try to include the >> "libname/helpers.scm" file from the current directory, which does not >> exist. >> >> Conversations with leoprikler in IRC have revealed to me that >> call-with-include-port is the function responsible for this behavior >> . >> `syntax-source` returns a file path relative to the load path, and >> include tries to use that path to open a file relative to the current >> working directory. >> >> In Guile's bug guidelines >> , >> to me this fits >> >> * Whenever documentation and actual behavior differ, you have certainly >> found a bug, either in the documentation or in the program. >> >> and potentially >> >> * When some part of the documentation is not clear and does not make >> sense to you even after re-reading the section, it is a bug. >> >> I believe this is a bug, but I may be wrong, so emailing to clarify. >> Thank you! >> >> Vijay Marupudi >> PhD Student in Human Centered-Computing >> Georgia Institute of Technology >> >> >> >> >