GNU bug report logs - #49452
Confusing behavior with (include) used in file in GUILE_LOAD_PATH

Please note: This is a static page, with minimal formatting, updated once a day.
Click here to see this page with the latest information and nicer formatting.

Package: guile; Reported by: Vijay Marupudi <vijaymarupudi@HIDDEN>; dated Wed, 7 Jul 2021 06:29:02 UTC; Maintainer for guile is bug-guile@HIDDEN.

Message received at 49452 <at> debbugs.gnu.org:


Received: (at 49452) by debbugs.gnu.org; 8 Jul 2021 13:57:24 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Thu Jul 08 09:57:24 2021
Received: from localhost ([127.0.0.1]:57061 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1m1UWo-0006Lf-SR
	for submit <at> debbugs.gnu.org; Thu, 08 Jul 2021 09:57:24 -0400
Received: from mail-dm6nam12on2103.outbound.protection.outlook.com
 ([40.107.243.103]:17537 helo=NAM12-DM6-obe.outbound.protection.outlook.com)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <vijaymarupudi@HIDDEN>) id 1m1SR1-0004FG-Su
 for 49452 <at> debbugs.gnu.org; Thu, 08 Jul 2021 07:43:19 -0400
ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none;
 b=WRvPM/K4DC42Sfp4qaLB3Dm/iG8sKUtRGKGKhbraeYmkUrGLgvWOQJyAs9ePF39BnyZ9OIA4irLMKwB0GtCZcWp3WbBvoveZ/wNwdSXPvgwhP0MaGZNtqFyKkotlesHkObClhzUVuSblNEqxQGtxulQMdUlC7Z3vj/Va2eUwhuzYRWaZ/IP36IzCdpUcr74s5DZ0hcRjAFA2d5CvbDPl401CZ1pCUWckAoVbh4z0eDvROjo2oisJkWbbr7aRIDr8afUlCem+CBHZOxRwq5q21FSZGATaDs7GtZaUTmunE5Ale0O1pBuujQjHHJvj3cqQ/JFW0DdZ1cdPq/u+4x6sSA==
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=m5lWAVWstBaarM+fjf++IMYO5wS/fxouJNmeibZDzm0=;
 b=DS1k3GG8waIFqaepR7zarGFCK4R1Da+HpwZCGi+1/OYO7r0yQt1nPWDw4Aubl1YQeFr48AT++a52khtPPaeCSaCXEd5ToO8tFRfJckGOUs1AimxXCb1XdkLvulJvvult0nMH5Q0JNoFSaRQB4qbOlNpM4L8KKi+zRL+k2rjnXGOg8Z32nIjmdWND5KSoykC61MpFXdEi8KLuidqacL2twflbLQ46ny3M/PCL+pgfOodnbXGN+Em+SYZJOqp3XcLnBif9alW42JxEYLmVn/9z2IKpUSKnCzPmDRaWb9uRPWxVzbU/+3RieHocUF7Y7UfRjvt4k4rv2Xbgb2wYAySg+Q==
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=m5lWAVWstBaarM+fjf++IMYO5wS/fxouJNmeibZDzm0=;
 b=eRvPBhsfN+ydvkmiESJ3PeBOZeIrWALqI4p/y8Sp8CC05GCkH2ib6qyPOlpR6Qlu1ONPMdjA4IT3sWLBJ6WVFjviKEAeYa4cOkW+hyJbz5/HGQS/icz/bXWNRDU/1Cptaf3SdCUk60P1pgdNSt3vLgGuo995DsBsCo60SksElHQ=
Authentication-Results: debbugs.gnu.org; dkim=none (message not signed)
 header.d=none; debbugs.gnu.org; dmarc=none action=none header.from=gatech.edu; 
Received: from BN8PR07MB5793.namprd07.prod.outlook.com (2603:10b6:408:9c::19)
 by BN8PR07MB8226.namprd07.prod.outlook.com (2603:10b6:408:74::24)
 with Microsoft SMTP Server (version=TLS1_2,
 cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.4308.21; Thu, 8 Jul
 2021 11:43:08 +0000
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; Thu, 8 Jul 2021
 11:43:08 +0000
Subject: Re: bug#49452: Confusing behavior with (include) used in file in
 GUILE_LOAD_PATH
To: Taylan Kammer <taylan.kammer@HIDDEN>, 49452 <at> debbugs.gnu.org
References: <7b37a89f-39a6-1433-daf4-469a40656a6b@HIDDEN>
 <f043844e-dc06-6849-688a-d780e4706237@HIDDEN>
From: Vijay Marupudi <vijaymarupudi@HIDDEN>
Message-ID: <ac84f060-b09c-f182-9473-a6cbcd743820@HIDDEN>
Date: Thu, 8 Jul 2021 06:43:05 -0500
User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:78.0) Gecko/20100101
 Thunderbird/78.11.0
In-Reply-To: <f043844e-dc06-6849-688a-d780e4706237@HIDDEN>
Content-Type: text/plain; charset=utf-8
Content-Language: en-US-large
Content-Transfer-Encoding: 7bit
X-ClientProxiedBy: CH2PR04CA0013.namprd04.prod.outlook.com
 (2603:10b6:610:52::23) To BN8PR07MB5793.namprd07.prod.outlook.com
 (2603:10b6:408:9c::19)
MIME-Version: 1.0
X-MS-Exchange-MessageSentRepresentingType: 1
Received: from [192.168.1.45] (97.127.103.8) by
 CH2PR04CA0013.namprd04.prod.outlook.com (2603:10b6:610:52::23) with Microsoft
 SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id
 15.20.4308.20 via Frontend Transport; Thu, 8 Jul 2021 11:43:07 +0000
X-MS-PublicTrafficType: Email
X-MS-Office365-Filtering-Correlation-Id: c053f93f-a5b3-4382-e7fa-08d942058e58
X-MS-TrafficTypeDiagnostic: BN8PR07MB8226:
X-Microsoft-Antispam-PRVS: <BN8PR07MB8226D667E69636CD9B4E19C6D2199@HIDDEN>
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: q63rXsGGLDEz1u5YRsOvqA82mjZNjBYKchQSje+XAuWTzrAi3PsrsIVsh4XmNmxX6RUYTuE7zV3brunG0djlBnHUD66CkI1TjCvKpsP/MR20qd0JVYbsjix2oX1dVM73pu+iv9TWLGNdXK7oJlLsSd+XaTYaDczplyBuvXF4IIRJszqKloSto4CRmtXcxrTcsUrEiS/gx61Cjn/FsfBWm5cOTCwPLOSSmehAk7/AzqwsCruVbgKwkwGK9bRp5Uf//ei/QMn3beWjb4WTk8tIywo0Tk1h8zRNADr4lKR14zoMq158U9qN+6w/o6L4C7SkILZyMGidujSvAADR75wSE7aVW2jDkeLdpd4qJvAInVZ4ztH9K0x6zhoIrnQBvQL/U8MSa/9W5DSbvzidLJw5GNngOJttAAnTpmgwC9sFaOMue9MJ9i5AT846HmnlRui1R2TdcfaCvZaXEwCwM0MgF/8Hb9eyv7JtwZHE3M/Wb2q58MimOiuUjqV67gjMr6T037YZiIhAcbJ0T/PR3oFUm3fqJ+rB7GGu4T7ExYs0LwRPR6Kt+01ApmGyHJQ3nV2+rB/FWbt3W9G9Uum0HD1O/iVE0d8p42S26A0Z5EGXP+fLVqBQcT0VctLMVVOETTxSpFJka3N/K6aIqY9TctZWAxnMI6QND5phJ4QJu8g5RGQMf3oLryBxmkjnKv7NhVQbYOJ0aRZKr4KyJ5yXaHBBR9ewRkpaUHmyABSksPw/sYs4gHm9Nb4kiSH/o86Wj1nl7vN/KtIHCb5goB3USdkHDKZLkExe0le6fc0C2fhlH0p/gkcT6f4jAhT2EH7zzaIj
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)(366004)(39860400002)(346002)(136003)(396003)(376002)(6486002)(2906002)(53546011)(83380400001)(478600001)(31686004)(26005)(16576012)(8676002)(966005)(36756003)(5660300002)(786003)(38100700002)(86362001)(75432002)(66476007)(316002)(186003)(31696002)(66556008)(956004)(66946007)(2616005)(8936002)(43740500002)(45980500001);
 DIR:OUT; SFP:1102; 
X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1
X-MS-Exchange-AntiSpam-MessageData-0: =?utf-8?B?elRpcEY5djNaMU4xWFBOQ2NVanVpSjgrNndDekV5UnphWWQzYVVLQnNESitV?=
 =?utf-8?B?MTJyVWxxblBtMzhydVk1SkpPN0dNaEtseFBKcEtqdEhnTys0WEFTYkEybDI4?=
 =?utf-8?B?d1RtWkpDNXhTeWhsREd3aGIzYW1jSE4xRHNTRk9LallhcUJ6UVdJem5uTnFw?=
 =?utf-8?B?dUR5bUFkVnJaOTc4eHpBV2h2T2lRTnVPVzh3a21Cd3Buam1veldSc2dhV1hV?=
 =?utf-8?B?SmtBcnhGU2dJcWFiL3ZteXpWMVRKaG4wRkhmYUJycElURUNJMlA2YjVsV0s1?=
 =?utf-8?B?d2M0RkF2Q2o2bWhMd0xobmVoU3lzak8wTUE0YUhRc2dqUXNIQUZpZDRmSm1V?=
 =?utf-8?B?SXdMeHJDSDMwdkxEc0VORFMvS1RCZllieE1kdUQ3bjhwZEFkbmlOWUpFRHdW?=
 =?utf-8?B?OFZUb2Rvcm5NSzhIcEdBMTFHK1hhMVBncWNTK050d0t5SWtFQmltSVF2V2VL?=
 =?utf-8?B?U3JmWE1wMmFkbTNKdERuTStBaXp1WFhkekRjZU9UTndsb3RyT1VLeUFrSXE1?=
 =?utf-8?B?emI2WkFGb29tZlRtdTVtVlg0Z0VPTDRyYk9IYmMxQjNCUDNtTGFiY1drQzQ5?=
 =?utf-8?B?eVM0aWJUdElDSFJNT0oxS3NDZTFJcHFQZS80L2ZZRloxdEJYUWZ2TklhWk92?=
 =?utf-8?B?Mk5sWXZqZTRjVUxaY05aMldNU2E5SXRUUVNpaFpOYW1OYzlzYXdYWDFybzN1?=
 =?utf-8?B?NW42NGtHSnJHRUVBRlFTSkl0WENVY0k2N2w1bFZRVDNGTGV3aW14K1ZPdFZ5?=
 =?utf-8?B?VkxKY09SeEpTc2M4QTJCRmpXQzcwYStaVnNrUnhML2o0dlZkMElTSWVtbmRE?=
 =?utf-8?B?VGg1cW4xN0RDR1FsNWtMcHE3OWk3UGZvTjhYYTRPRXNIbEUvMGNEajFxVkxh?=
 =?utf-8?B?Uk5CNGRnc1paeTJicUlHVFdzQTV5eE9nek8xQ0cwdytUYkl5TVVLeTNlSnV2?=
 =?utf-8?B?MzZEMVE0TURtMDViSzVaSXc1WklkNGJrdmN3WjArRmFSU3BBTngyY09QMlg5?=
 =?utf-8?B?TVNSSkpkYnZ2cEVYWE5lcnhKQjYzSGxxU2NPanNHZDA0UTJ3dHQ1NnFPb25s?=
 =?utf-8?B?SUZCUzIwYytQMGxUQkdPazRWZHlhenEyRng2UTZ6UU14VytMeVJESFBoalov?=
 =?utf-8?B?R3YyemRid0xEZHpGRmRDL3l6TjE2NjRzU1pqbm9OOWJNaExlK1dlbGlNNHdY?=
 =?utf-8?B?UWt5L2p2QTIxUTNUcnN2R0VBbmU2V3RMN3h2cDdpSEd0bmlxQWRLMnlvZkp2?=
 =?utf-8?B?aTRidS9wem1DbUR2VUtlSjBkQXprWE5ib0hZZEl3VGF6RTJ6N1VVVHpQODVu?=
 =?utf-8?B?aGlRMmZzdmlrWUhUbStVTmxDY05iRi9VMlFQTGRzWE43Q2xyVExkQzF2Zlk4?=
 =?utf-8?B?MDNUbk1lSGlHd2g3MnhiVll2MW1lR3pUdlM1aldvekxaU1E2QlBUL294d2RR?=
 =?utf-8?B?a3hGOTFkd09hQi9CNlFRMHloYm5LRHRqbWZzQlJHbjV6Ykg5dVJqaHhhQzgz?=
 =?utf-8?B?d1I5d1EzZURHakZPYzA4aDhZd2FWZElDRTNnU2lmQnlTMy9PbnNBMGtHYzRu?=
 =?utf-8?B?N3VaMnp6SExRbjF4ZE9SeGEyQmpKMlpQc0YzU1ZkcE5sN0EzQlI4aE44OWJW?=
 =?utf-8?B?MzZPYndyRnB5YWVjNGcwdmdOMk0wL09aRjNSZGh0VVlpa3dxaGJTMURMTCtx?=
 =?utf-8?B?ZmUvMFJnRW5oWXYveEcyNE0zbTc5UnBQMEY0OFI2KzRSaEFNeDFKdkFiNU1H?=
 =?utf-8?Q?sRnKaYEqQfP1gHkCql4uKnhDzWdZfTeh97HLpV6?=
X-OriginatorOrg: gatech.edu
X-MS-Exchange-CrossTenant-Network-Message-Id: c053f93f-a5b3-4382-e7fa-08d942058e58
X-MS-Exchange-CrossTenant-AuthSource: BN8PR07MB5793.namprd07.prod.outlook.com
X-MS-Exchange-CrossTenant-AuthAs: Internal
X-MS-Exchange-CrossTenant-OriginalArrivalTime: 08 Jul 2021 11:43:08.3504 (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: XWBvuWxZ772aSWHjEScQieOjKSSdEV5eX1REgb3E0ULrk+cstbiQHNb1CxAItDjc9aFeogg2Bli8/3LzRh1Xiw==
X-MS-Exchange-Transport-CrossTenantHeadersStamped: BN8PR07MB8226
X-Spam-Score: -0.0 (/)
X-Debbugs-Envelope-To: 49452
X-Mailman-Approved-At: Thu, 08 Jul 2021 09:57:21 -0400
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -1.0 (-)

Thank you Taylan. This does appear to be the same bug. This bug can be
closed as a duplicate. Looks like Andy Wingo suggested a potential fix,
but there was no follow-up. If someone is willing to show me the ropes
when I need them, I can take a stab at learning the Guile codebase and
fixing the bug.

Vijay

On 7/7/21 3:29 AM, Taylan Kammer wrote:
> On 07.07.2021 02:31, 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
>> <https://www.gnu.org/software/guile/manual/html_node/Local-Inclusion.html>
>> 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.
>>
>> 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
>> <https://git.savannah.gnu.org/cgit/guile.git/tree/module/ice-9/psyntax.scm#n3231>.
>> `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
>> <https://www.gnu.org/software/guile/docs/docs-2.2/guile-ref/Reporting-Bugs.html>,
>> 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
> 
> Hi Vijay,
> 
> I believe this is the same bug as this one I reported 5-6 years ago:
> 
> https://bugs.gnu.org/21613
> 
> Sadly there was no progress on it as far as I know.
> 




Information forwarded to bug-guile@HIDDEN:
bug#49452; Package guile. Full text available.

Message received at 49452 <at> debbugs.gnu.org:


Received: (at 49452) by debbugs.gnu.org; 7 Jul 2021 21:23:10 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Wed Jul 07 17:23:10 2021
Received: from localhost ([127.0.0.1]:53655 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1m1F0g-00053m-7T
	for submit <at> debbugs.gnu.org; Wed, 07 Jul 2021 17:23:10 -0400
Received: from imta-37.everyone.net ([216.200.145.37]:34448
 helo=imta-38.everyone.net)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <bokr@HIDDEN>) id 1m1F0e-00053c-6h
 for 49452 <at> debbugs.gnu.org; Wed, 07 Jul 2021 17:23:08 -0400
Received: from pps.filterd (omta004.sj2.proofpoint.com [127.0.0.1])
 by imta-38.everyone.net (8.16.0.43/8.16.0.43) with SMTP id 167LCvdP018169;
 Wed, 7 Jul 2021 14:23:06 -0700
X-Eon-Originating-Account: kilUXqgwSWrDyOFqjsLrM4qo6m9x7L5CD1v4nQ4A43Q
X-Eon-Dm: m0117124.ppops.net
Received: by m0117124.mta.everyone.net (EON-AUTHRELAY2 - 5a81c3da)
 id m0117124.60d3a86c.109299; Wed, 7 Jul 2021 14:23:05 -0700
X-Eon-Sig: AQMHrIJg5hs5u/wpFAIAAAAC,b1045872096b0e15bcd02fbb216a4d25
X-Eip: lnIrDHTGfYt7EAV3yLEQRv6wc7vJl0_O7VpWxc2wTNE
Date: Wed, 7 Jul 2021 23:22:56 +0200
From: Bengt Richter <bokr@HIDDEN>
To: Vijay Marupudi <vijaymarupudi@HIDDEN>
Subject: Re: bug#49452: Confusing behavior with (include) used in file in
 GUILE_LOAD_PATH
Message-ID: <20210707212256.GA2266@LionPure>
References: <7b37a89f-39a6-1433-daf4-469a40656a6b@HIDDEN>
MIME-Version: 1.0
Content-Type: text/plain; charset=utf-8
Content-Disposition: inline
In-Reply-To: <7b37a89f-39a6-1433-daf4-469a40656a6b@HIDDEN>
User-Agent: Mutt/1.10.1 (2018-07-13)
X-Proofpoint-GUID: 9YbP1ch8zRgePsE4yFfU7KOkVoBsslIo
X-Proofpoint-ORIG-GUID: 9YbP1ch8zRgePsE4yFfU7KOkVoBsslIo
X-Proofpoint-Virus-Version: vendor=fsecure engine=2.50.10434:6.0.391, 18.0.790
 definitions=2021-07-07_09:2021-07-06,
 2021-07-07 signatures=0
X-Proofpoint-Spam-Details: rule=notspam policy=default score=0
 lowpriorityscore=0 adultscore=0
 mlxlogscore=999 clxscore=1034 priorityscore=1501 bulkscore=0
 suspectscore=0 phishscore=0 mlxscore=0 malwarescore=0 impostorscore=0
 spamscore=0 classifier=spam adjust=0 reason=mlx scancount=1
 engine=8.12.0-2104190000 definitions=main-2107070122
X-Spam-Score: 0.3 (/)
X-Debbugs-Envelope-To: 49452
Cc: 49452 <at> debbugs.gnu.org
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Reply-To: Bengt Richter <bokr@HIDDEN>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -0.7 (/)

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
> <https://www.gnu.org/software/guile/manual/html_node/Local-Inclusion.html>
> 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
> <https://git.savannah.gnu.org/cgit/guile.git/tree/module/ice-9/psyntax.scm#n3231>.
> `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
> <https://www.gnu.org/software/guile/docs/docs-2.2/guile-ref/Reporting-Bugs.html>,
> 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
> 
> 
> 
> 

-- 
Regards,
Bengt Richter




Information forwarded to bug-guile@HIDDEN:
bug#49452; Package guile. Full text available.

Message received at 49452 <at> debbugs.gnu.org:


Received: (at 49452) by debbugs.gnu.org; 7 Jul 2021 08:29:59 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Wed Jul 07 04:29:59 2021
Received: from localhost ([127.0.0.1]:50800 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1m12wR-0002zd-4u
	for submit <at> debbugs.gnu.org; Wed, 07 Jul 2021 04:29:59 -0400
Received: from mail-wr1-f44.google.com ([209.85.221.44]:46961)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <taylan.kammer@HIDDEN>) id 1m12wP-0002zB-Rg
 for 49452 <at> debbugs.gnu.org; Wed, 07 Jul 2021 04:29:58 -0400
Received: by mail-wr1-f44.google.com with SMTP id d12so1438554wre.13
 for <49452 <at> debbugs.gnu.org>; Wed, 07 Jul 2021 01:29:57 -0700 (PDT)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025;
 h=subject:to:references:from:message-id:date:user-agent:mime-version
 :in-reply-to:content-language:content-transfer-encoding;
 bh=E6ho5fmhArAKmwKDnRTghWiG37nzbr1LHhRHHdRnKp8=;
 b=FAaYXMFfDmmvYZmpSN42psvzjJMlB1Fx3jaHUjEqrXM60MSVqDivuACYqVKgS7daTi
 w6hTkeN/FXcROFZbkEHWZ0+oyHG8C8XRk3FJqkAEHGndw/EpEscRYnK+ngFs9hZeasu2
 +MKv2c7OZn4rO2G6nG3JdCRTJhBH/oAudUPKQkdcfimsBTo6p8sB7fmyVghOiiY+C7J9
 6Ih8Sq4IkTynX6Idavs1iSvPj3JYw3iYbfkpoUZG7u1R78/+cJO69hRdPdg1/wM+MYkr
 bY14tyNccd7THMv6W90mu6ZMk+hA/iZ3EwHnmGMfOXEe2Jy5BL3hN6bclHPHNhLS2l3x
 dTzg==
X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
 d=1e100.net; s=20161025;
 h=x-gm-message-state:subject:to:references:from:message-id:date
 :user-agent:mime-version:in-reply-to:content-language
 :content-transfer-encoding;
 bh=E6ho5fmhArAKmwKDnRTghWiG37nzbr1LHhRHHdRnKp8=;
 b=mIuGvAsjlxLalBp3Dg1nihJjeLIuVFv4WwDyf5nw/virYP3BA42l6TNx+s5jzmTH/B
 FeiqnzHRn76D5BM68IXnoTLbl8+dgkXadDXybgoOMTdFAr4hPv/iFrxu2P4hk4HKYgLo
 QMS6ypqFYYrNfR3f0oHj6JDNweooYOjQ/sPE+m3qGbC0MrhXWTBLf5gdMoZByvZ+LTLl
 8nBV9PDefQxU3Wu9f40SQPQlfQ4AOW44t4W3oNHQyy+MFzWzqOEOFjdr0XneaxF7bBwU
 xWMC2MvmRmYdXGZGXvfmpdjfqK85Wnvs4HLuPDzsitMeeL2/kD2QUagPpJ7LBb4bU20j
 0CnQ==
X-Gm-Message-State: AOAM533tYbRiSXwrYQsH3enPjBwY/pLttdqzHKOS31iikc8w37qqQzzy
 d/Ed/ossOGYRCDabvjs5PWlN+TSiBmo=
X-Google-Smtp-Source: ABdhPJxe1EbkDRMutQN6tvgXNP9879bp+tANq1lEgm3tx22TiiBjDfP3caHhWoWVfimT4uhY3QivZA==
X-Received: by 2002:a5d:5189:: with SMTP id k9mr27391190wrv.250.1625646591885; 
 Wed, 07 Jul 2021 01:29:51 -0700 (PDT)
Received: from [192.168.178.20] (b2b-109-90-125-150.unitymedia.biz.
 [109.90.125.150])
 by smtp.gmail.com with ESMTPSA id p15sm17574221wmq.43.2021.07.07.01.29.51
 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128);
 Wed, 07 Jul 2021 01:29:51 -0700 (PDT)
Subject: Re: bug#49452: Confusing behavior with (include) used in file in
 GUILE_LOAD_PATH
To: Vijay Marupudi <vijaymarupudi@HIDDEN>, 49452 <at> debbugs.gnu.org
References: <7b37a89f-39a6-1433-daf4-469a40656a6b@HIDDEN>
From: Taylan Kammer <taylan.kammer@HIDDEN>
Message-ID: <f043844e-dc06-6849-688a-d780e4706237@HIDDEN>
Date: Wed, 7 Jul 2021 10:29:49 +0200
User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:78.0) Gecko/20100101
 Thunderbird/78.11.0
MIME-Version: 1.0
In-Reply-To: <7b37a89f-39a6-1433-daf4-469a40656a6b@HIDDEN>
Content-Type: text/plain; charset=utf-8
Content-Language: en-US
Content-Transfer-Encoding: 7bit
X-Spam-Score: -0.0 (/)
X-Debbugs-Envelope-To: 49452
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -1.0 (-)

On 07.07.2021 02:31, 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
> <https://www.gnu.org/software/guile/manual/html_node/Local-Inclusion.html>
> 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.
> 
> 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
> <https://git.savannah.gnu.org/cgit/guile.git/tree/module/ice-9/psyntax.scm#n3231>.
> `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
> <https://www.gnu.org/software/guile/docs/docs-2.2/guile-ref/Reporting-Bugs.html>,
> 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

Hi Vijay,

I believe this is the same bug as this one I reported 5-6 years ago:

https://bugs.gnu.org/21613

Sadly there was no progress on it as far as I know.

-- 
Taylan




Information forwarded to bug-guile@HIDDEN:
bug#49452; Package guile. Full text available.

Message received at submit <at> debbugs.gnu.org:


Received: (at submit) by debbugs.gnu.org; 7 Jul 2021 06:28:59 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Wed Jul 07 02:28:59 2021
Received: from localhost ([127.0.0.1]:50627 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1m113K-0008RL-A4
	for submit <at> debbugs.gnu.org; Wed, 07 Jul 2021 02:28:59 -0400
Received: from lists.gnu.org ([209.51.188.17]:52658)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <vijaymarupudi@HIDDEN>) id 1m0vYW-0007ud-4C
 for submit <at> debbugs.gnu.org; Tue, 06 Jul 2021 20:36:48 -0400
Received: from eggs.gnu.org ([2001:470:142:3::10]:32854)
 by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256)
 (Exim 4.90_1) (envelope-from <vijaymarupudi@HIDDEN>)
 id 1m0vYV-0000tH-SH
 for bug-guile@HIDDEN; Tue, 06 Jul 2021 20:36:47 -0400
Received: from mail-mw2nam12on20712.outbound.protection.outlook.com
 ([2a01:111:f400:fe5a::712]:45408
 helo=NAM12-MW2-obe.outbound.protection.outlook.com)
 by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256)
 (Exim 4.90_1) (envelope-from <vijaymarupudi@HIDDEN>)
 id 1m0vYT-0001bo-9F
 for bug-guile@HIDDEN; Tue, 06 Jul 2021 20:36:47 -0400
ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none;
 b=Qbs4jSyQpwd9ojmVE9x6aNhGQINlP9EKK+JUPnLTt/yWsck2p3IP4clvP3qHc7py/lBd0hXOe1F5kvJKQQN2daxkum7+fyqM/aMNNZcrKSE+yfXwpds7yJ4A5KIwhHwOKH6NbZjqij0Wk0NY60FukYKNrex7+XEPlOcbwYbFIgNSg4e/ILwxIlOYirYOZVGtmbvUUCNmtpBv91s8/0XIRr9uY2Rt4b8n3EXnaHEg/fKY9YFyGXHtELpz50sCrGNC9xL0/q4s4D6j0JYEaqZXKcH0V4VWXTxvFQM2rXFrGgv07vsxf/oYVXQDkp2G03tfADbQ1XaYcEvUkvCL9WpJ+A==
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=VtT3Q9yVDIixBUbrCgl+iNX91rHknlDPyDKJovCs0LU=;
 b=gePHd51gru4Xsa9JjU+A7p7+JWAgQKcr1HnmQvFkPsNcScvlbVr/DWY/VU7mzZdvKz7W6z/M94kVVF2GNaD54Gir+YktF7CFAc7N2Sf2Tt3quUxuyDKDEF5DSuCRnxhBRYX6JvxZMCnxast+owdbmFbZz4L4/4rF+cHw/vHp+/XkCqDizMMGUMvCScDRL9819P6WBJejo4X0O0gAdBBfL7gr/a09wcgFAnG0IERd9H89rx8mfT2w5af5LyPTsIjyP+Z1OJYjzHrOhjxlnV3w2eAPBHEYkheePrIm321duv/p4GY5EzTTBUeHTIY31inTdtJIXvKg5NWd58P/OwfAbQ==
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=VtT3Q9yVDIixBUbrCgl+iNX91rHknlDPyDKJovCs0LU=;
 b=zto7uWBaK43evv+U8wRZDfiSTmk0Q4f8/ShxxAY7prEKssLdf+Ay4/sZWqNLXcH1LzxHTS0AHFKjpdj3vIFzvDk2SNZFVC0+Ho9gBvTehsUDtAJCd2Wag1MCeZafBOs7RieBlvAkM8AIgjRKHgOdvFizdgTYvAWpzsO3j2E/ldY=
Authentication-Results: gnu.org; dkim=none (message not signed)
 header.d=none;gnu.org; dmarc=none action=none header.from=gatech.edu;
Received: from BN8PR07MB5793.namprd07.prod.outlook.com (2603:10b6:408:9c::19)
 by BN7PR07MB5156.namprd07.prod.outlook.com (2603:10b6:408:21::13)
 with Microsoft SMTP Server (version=TLS1_2,
 cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.4287.32; Wed, 7 Jul
 2021 00:31:39 +0000
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.4287.033; Wed, 7 Jul 2021
 00:31:39 +0000
To: bug-guile@HIDDEN
From: Vijay Marupudi <vijaymarupudi@HIDDEN>
Subject: Confusing behavior with (include) used in file in GUILE_LOAD_PATH
Message-ID: <7b37a89f-39a6-1433-daf4-469a40656a6b@HIDDEN>
Date: Tue, 6 Jul 2021 19:31:38 -0500
User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:78.0) Gecko/20100101
 Thunderbird/78.11.0
Content-Type: text/plain; charset=utf-8
Content-Language: en-US-large
Content-Transfer-Encoding: 7bit
X-ClientProxiedBy: CH0PR04CA0038.namprd04.prod.outlook.com
 (2603:10b6:610:77::13) To BN8PR07MB5793.namprd07.prod.outlook.com
 (2603:10b6:408:9c::19)
MIME-Version: 1.0
X-MS-Exchange-MessageSentRepresentingType: 1
Received: from [10.64.242.111] (68.235.43.94) by
 CH0PR04CA0038.namprd04.prod.outlook.com (2603:10b6:610:77::13) with Microsoft
 SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id
 15.20.4287.23 via Frontend Transport; Wed, 7 Jul 2021 00:31:39 +0000
X-MS-PublicTrafficType: Email
X-MS-Office365-Filtering-Correlation-Id: 70766e7c-b668-49d4-5f95-08d940de9635
X-MS-TrafficTypeDiagnostic: BN7PR07MB5156:
X-Microsoft-Antispam-PRVS: <BN7PR07MB5156953125100C42D85D3221D21A9@HIDDEN>
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: xJwfTkIJ/VYuCXaSd6qqxMzu9fo0vN8CzKLCffn+IScnQtYjeODWe6bFQi5P8c3TtPYlztcJ2eT5l+0LCpbvnvvh+oCFiorrAUaa5iV8rDxNOTd5YaC62XdC8KcsfBtcha+JABvX++o+Xm+i2Eoz2U4WQs+yYopLnJn425hmcL4124IAy6Tc80IYyYiptR0LZrFfby8OcqKB3VGpL+0T+2YyKeNIB7KuTTxVl7jptlJhHd0PuS328SiKjDYa8xclAbj6JgZZMOV7SNC1TXTdunBnbtyjU6JvqZcBTs2fKE1l3JxjxReYkrE9URi8Hnl34c5dT2i2x9h7kirVTgx2XoKxeVBskkR/mlhEBAptIcbPZu8bpmbJXtMQ/8CV3lKHR6XygjQctZOOJ0XIWGGQCLDY8nZiIMWuVyAbGePJ6VxVqqAbRraQsw2v54HXPr3FekIE/chU+s2TNB29w5XjU8LqBNarsCzPfYrQO4YG/eTt9QOqPpI4FQ/mecS2+sqX6mN57xh34O4wV7YIt5EPctTXtZ3iyAfrAr0FRRI1KCjIcKEXK2jMca9+1gWCdMvM1gKZOWz4fEUiww1UIU6FrGCbO7erMtEdyUkmsWG8bmBJ9Qxr+f5tWyP5bRRib1dXWCZCDk9jOm0DvHpWcNjVX3yykMEvebn5ThqkL9t+vbwaQgwdU+qTNA+AgUVVaLhy4T3YRSUkhjLWQfqv6k1FP0W+oFOgAtgTguGhOf5CX0XpInDjxa5RiuP0wXYDbABgaMNNtjjBA8nwg73SMfDOkiCFvdL+OF+N6tvJaJ6KUfB5yIGVXkapGRlYFZRFRpiz
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)(136003)(396003)(376002)(366004)(346002)(39860400002)(8676002)(316002)(5660300002)(83380400001)(31686004)(31696002)(186003)(786003)(66556008)(6916009)(86362001)(66476007)(16576012)(66946007)(478600001)(2906002)(26005)(38100700002)(8936002)(6486002)(75432002)(956004)(2616005)(36756003)(45980500001)(43740500002);
 DIR:OUT; SFP:1102; 
X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1
X-MS-Exchange-AntiSpam-MessageData-0: =?utf-8?B?dmd6MGdJSGxFc1VQcmpQWVg0TEVnL21TWEN5cnhjR3JsbFdJNmIwVWtyK0E2?=
 =?utf-8?B?OVV3NDgyYlRsMHhJUTVaTnNvRmlzaUFYQUhiQURNaVRLVjV0UEh2S092NzJY?=
 =?utf-8?B?MEo5eUZSRU93RWVKaUVEY2R5K1VRWnlqTGZxNFJaZDFUMGFnSVFyY0FVVkFX?=
 =?utf-8?B?L3FYa2FHcFpJTmJsc3J2WU1QeWI3a1ByT0puK200Wnl6RDBLVHZHMy9IV0tn?=
 =?utf-8?B?VkRzUUtPQmc4Ym9lNzFOWnhmQWN5UXNmUmRzOWZLeWZEK1ByQ1RzaEMrVitl?=
 =?utf-8?B?eG1OdGIwTEs1NC9Wd0p6dEJWOThHQXlvSHdVWVlFR0s4TlJzS0lKWGhOMHVj?=
 =?utf-8?B?Z2xTZkovWTdWT0ZYdWErdEtmSnlJZUZBckVWQTl3K2xwRjBLeFVyTExaNkoy?=
 =?utf-8?B?bmxJUXExcUhuN2ZHVjJxT1JrbjVyK1Q5djh3b3dQYmRMOU9LSXYwZ0ppZ2Fr?=
 =?utf-8?B?dWhDZCt6M2tNcGdzVWdjT0hWRFVRY3hyc2orOUZKY0E3VGlUaGE2WmpsbVR2?=
 =?utf-8?B?a1FXK1Q2RFhvRllrenRkZ1pJUHJobjRGMTNnQXo4QnVyVE9hUVlEMm83Z3pW?=
 =?utf-8?B?ZFUxaU9WVDZNOWF3SmdueDZsMERUY0FVY0Y4VkdMQjFBcnlEczBZNTZwbC8w?=
 =?utf-8?B?OFh3NU44MTFuYzdsajdhaG96c0lQRHliZVYwK3BTNGtHRm5iemJpbllEVjNC?=
 =?utf-8?B?ZzdnMTBDZ3lNbmY2UzhPYW4yVE5tcHBQSU0zaVljZTQyN09LaVJSUUtsLzZo?=
 =?utf-8?B?NXlhMkl5dWdMb1Rmb1QxcVlwL0hsQ2FPQTFIVzlKK3lpK2hLd1VZcTA1OTlp?=
 =?utf-8?B?VlBTODNiUlFVaW9CTWJ1YzA0VHJuTU9sZkMyL1V1Vzd5WWdGQUdyckhzOFVo?=
 =?utf-8?B?UGxCbzY1OW1vUnJ1KzlDUmFmL2hkMTBMZDFXcW51Y00ydVA0ZW0yaFBNMHJV?=
 =?utf-8?B?QS82UDhPOXFZZW9jb1JMYngrWVg0TUlvRXR3VlpISjJtOGhlbUU1S0V0NXQ1?=
 =?utf-8?B?TUJXVzlmMlhtWmxaemx1U1N2cWNydW56aFBEWm9Xd0F3SVB1ZVBxWkVVTFF1?=
 =?utf-8?B?THN5b21VQkpLL0x1d2NHREwxY3NienljL1BmS2NmWjNRTWY1ZWIzWEZQSXYx?=
 =?utf-8?B?TDhVeGticVkyaS9DYnVIM2NrVG1LR1BqOEdWM1ZjR282RlpaaU0vV0NIZGk5?=
 =?utf-8?B?YmJxVXZZdkMvdHJmR2pVekRuUzEyL245djVGMXZ0V21ibVhnVmRIL2dndlpH?=
 =?utf-8?B?eVJLOER5bnM5S3pzM3dXUEU5Um1Zb1ZJWHorQW5yREFuYlZ3RGVQcjVTY3Nz?=
 =?utf-8?B?aUR5emRiZEcrbkFqdThPWldUa2tyMEZtUVg0QXJBSE5BQ1JmNzI0Q3g1YWFP?=
 =?utf-8?B?NlIra1gyK3NSOTJ5NTNXcytBNU8yaHhnS3ZHVTdJcWFRcUFTVm1tVUhwVktZ?=
 =?utf-8?B?cExSWFVLZ29qVE4vWHVxOERRZDVnc3lUV2VpSy84VWZ3cm12WFMwN3A3cHRQ?=
 =?utf-8?B?aUpQbmNXT3Q5RGZhQ093Nlg0YldMa2ZsdVhxdUJ1aEJBZkJCN2RibDQzN1dK?=
 =?utf-8?B?VGptT1liblZKSVlHdk1ieFhtU2p0N1JZeVA0bHdmOWVtSmtZdFNOVlh5Y0Ra?=
 =?utf-8?B?M3pXcWFSVSt6ZzYrWGlkNDdCTVRUUGFIcDY3aUUwV0FiMEVpellob24rUWdK?=
 =?utf-8?B?eE4zdEJOdG1hYVRWblh5ZmpKMHVPdk52di9QZUJSWTR6NUtaajY1OTIxKzE3?=
 =?utf-8?Q?Z1B7ClIOsYPvlV/boEC3yUSq0gviw6qGNCg8b/J?=
X-OriginatorOrg: gatech.edu
X-MS-Exchange-CrossTenant-Network-Message-Id: 70766e7c-b668-49d4-5f95-08d940de9635
X-MS-Exchange-CrossTenant-AuthSource: BN8PR07MB5793.namprd07.prod.outlook.com
X-MS-Exchange-CrossTenant-AuthAs: Internal
X-MS-Exchange-CrossTenant-OriginalArrivalTime: 07 Jul 2021 00:31:39.8072 (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: a7TUfNlTQVGXt0CnSB23NgDEGqtcEqySOW2aN4eqDYmpqONv8ILU4Z4cCjA23Bow2QmPDDjXA9/uXW7gADW3tA==
X-MS-Exchange-Transport-CrossTenantHeadersStamped: BN7PR07MB5156
Received-SPF: pass client-ip=2a01:111:f400:fe5a::712;
 envelope-from=vijaymarupudi@HIDDEN;
 helo=NAM12-MW2-obe.outbound.protection.outlook.com
X-Spam_score_int: -20
X-Spam_score: -2.1
X-Spam_bar: --
X-Spam_report: (-2.1 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1,
 DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1,
 MSGID_FROM_MTA_HEADER=0.001, SPF_HELO_PASS=-0.001,
 SPF_PASS=-0.001 autolearn=ham autolearn_force=no
X-Spam_action: no action
X-Spam-Score: -1.6 (-)
X-Debbugs-Envelope-To: submit
X-Mailman-Approved-At: Wed, 07 Jul 2021 02:28:55 -0400
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -2.6 (--)

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
<https://www.gnu.org/software/guile/manual/html_node/Local-Inclusion.html>
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.

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
<https://git.savannah.gnu.org/cgit/guile.git/tree/module/ice-9/psyntax.scm#n3231>.
`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
<https://www.gnu.org/software/guile/docs/docs-2.2/guile-ref/Reporting-Bugs.html>,
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





Acknowledgement sent to Vijay Marupudi <vijaymarupudi@HIDDEN>:
New bug report received and forwarded. Copy sent to bug-guile@HIDDEN. Full text available.
Report forwarded to bug-guile@HIDDEN:
bug#49452; Package guile. Full text available.
Please note: This is a static page, with minimal formatting, updated once a day.
Click here to see this page with the latest information and nicer formatting.
Last modified: Thu, 8 Jul 2021 14:00:01 UTC

GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997 nCipher Corporation Ltd, 1994-97 Ian Jackson.