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 06:43:05 -0500 Message-ID: References: <7b37a89f-39a6-1433-daf4-469a40656a6b@gatech.edu> 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="25791"; 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 To: Taylan Kammer , 49452@debbugs.gnu.org Original-X-From: bug-guile-bounces+guile-bugs=m.gmane-mx.org@gnu.org Thu Jul 08 15:58: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 1m1UXZ-0006VB-2X for guile-bugs@m.gmane-mx.org; Thu, 08 Jul 2021 15:58:09 +0200 Original-Received: from localhost ([::1]:34558 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1m1UXY-0007zM-3E for guile-bugs@m.gmane-mx.org; Thu, 08 Jul 2021 09:58:08 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:58762) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1m1UXS-0007xw-Hg for bug-guile@gnu.org; Thu, 08 Jul 2021 09:58:02 -0400 Original-Received: from debbugs.gnu.org ([209.51.188.43]:45519) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1m1UXS-0006Lq-Au for bug-guile@gnu.org; Thu, 08 Jul 2021 09:58:02 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1m1UXS-0006Mt-9c for bug-guile@gnu.org; Thu, 08 Jul 2021 09:58:02 -0400 X-Loop: help-debbugs@gnu.org Resent-From: Vijay Marupudi Original-Sender: "Debbugs-submit" Resent-CC: bug-guile@gnu.org Resent-Date: Thu, 08 Jul 2021 13:58:02 +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.162575264424414 (code B ref 49452); Thu, 08 Jul 2021 13:58:02 +0000 Original-Received: (at 49452) by debbugs.gnu.org; 8 Jul 2021 13:57:24 +0000 Original-Received: from localhost ([127.0.0.1]:57061 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1m1UWo-0006Lf-SR for submit@debbugs.gnu.org; Thu, 08 Jul 2021 09:57:24 -0400 Original-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 ) id 1m1SR1-0004FG-Su for 49452@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; Original-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 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; Thu, 8 Jul 2021 11:43:08 +0000 In-Reply-To: Content-Language: en-US-large X-ClientProxiedBy: CH2PR04CA0013.namprd04.prod.outlook.com (2603:10b6:610:52::23) 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.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: 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/o86Wj 1nl7vN/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: zTipF9v3Z1N1XPNCcUjuiJ8+6wCzEyRzaYd3aUKBsDJ+U12rUlqnPm38ruY5JJO7GMhKlxPJpKjtHgO+4XASbA2l28wTmZJC5xSyhlDGwhb3amcHN1DsSFOKjYaqBzQWIznnNqpuDymAdVrZ978xzAWhvOiQNuOW8wkmBwpnjmozWRsgaWXUJkArxFSgIqab/vmyzV1TJhn0FHfaBrpITECI2P6b5lWK5wc4FAvCj6mhLwLhnehSysjO0MA4aHQsgjQsHAFid4fJmUIwLxrCH30vLDsENDS/KTBfYbxMduD7n8pdAdniNYJEDwV8VTodornMK8HpGA11G+Xa1PgqcS+NtwKyIkEBimIQvWeKSrfXMp2adm3JtDnM+AizuXXdzDceOTNwlotrOUKyAkIq5zb6ZAFoomfTmu5mVX4gEOL4rbOHbc1B3BP3mLabcWkC49yS4ibTtICHRMOJ1KsCe1IpqPe/4/fYFZ1tBXQfvNIaZOv2NlYvje4cULZcNZ2WMSa9ItTQSihZNamNc9sawXX1ro3u5n64kGJrGEEAFQSJItXCUcI67l5lVQT3FLewimx+VOtVyVLJcORxJSsc8A2BFjWC70a+ZVskRxL/j4vVd0ISIemndDTh5qn17DCGQl5kLpq79i7PfoN8Xa4OEsHlE/0cDj1qVLaRNB4dgsZZy2bqIGTWsA5yxOgzO1CG0w+TbIyMUKy3eJuv36D1Q4MDm05bK5ZIw5ZId4bkvcwZ0+FaRSpANx2cOP 2X9MSRJJdbvvpEXXNerxJB63HlqScOjsGd04Q2wtt56qOonlIFBS20c+P0lTBGOk4Vdyazq2Fx6Q6zQMxW+LyRDHPhjZ/Gv2zd 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-Mailman-Approved-At: Thu, 08 Jul 2021 09:57:21 -0400 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:10141 Archived-At: 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 >> >> 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 >> . >> `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 > > 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. >