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: Tue, 6 Jul 2021 19:31:38 -0500 Message-ID: <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="22827"; 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: 49452@debbugs.gnu.org Original-X-From: bug-guile-bounces+guile-bugs=m.gmane-mx.org@gnu.org Wed Jul 07 08:29:11 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 1m113V-0005jt-Hv for guile-bugs@m.gmane-mx.org; Wed, 07 Jul 2021 08:29:11 +0200 Original-Received: from localhost ([::1]:60658 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1m113T-0005DL-Jf for guile-bugs@m.gmane-mx.org; Wed, 07 Jul 2021 02:29:07 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:35996) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1m113P-0005Ba-45 for bug-guile@gnu.org; Wed, 07 Jul 2021 02:29:03 -0400 Original-Received: from debbugs.gnu.org ([209.51.188.43]:39089) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1m113O-0003j0-Ta for bug-guile@gnu.org; Wed, 07 Jul 2021 02:29:02 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1m113O-0008S7-Ra for bug-guile@gnu.org; Wed, 07 Jul 2021 02:29:02 -0400 X-Loop: help-debbugs@gnu.org Resent-From: Vijay Marupudi Original-Sender: "Debbugs-submit" Resent-CC: bug-guile@gnu.org Resent-Date: Wed, 07 Jul 2021 06:29:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: report 49452 X-GNU-PR-Package: guile X-Debbugs-Original-To: bug-guile@gnu.org Original-Received: via spool by submit@debbugs.gnu.org id=B.162563933932459 (code B ref -1); Wed, 07 Jul 2021 06:29:02 +0000 Original-Received: (at submit) by debbugs.gnu.org; 7 Jul 2021 06:28:59 +0000 Original-Received: from localhost ([127.0.0.1]:50627 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1m113K-0008RL-A4 for submit@debbugs.gnu.org; Wed, 07 Jul 2021 02:28:59 -0400 Original-Received: from lists.gnu.org ([209.51.188.17]:52658) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1m0vYW-0007ud-4C for submit@debbugs.gnu.org; Tue, 06 Jul 2021 20:36:48 -0400 Original-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 ) id 1m0vYV-0000tH-SH for bug-guile@gnu.org; Tue, 06 Jul 2021 20:36:47 -0400 Original-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 ) id 1m0vYT-0001bo-9F for bug-guile@gnu.org; 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; Original-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 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.4287.033; Wed, 7 Jul 2021 00:31:39 +0000 Content-Language: en-US-large X-ClientProxiedBy: CH0PR04CA0038.namprd04.prod.outlook.com (2603:10b6:610:77::13) To BN8PR07MB5793.namprd07.prod.outlook.com (2603:10b6:408:9c::19) X-MS-Exchange-MessageSentRepresentingType: 1 Original-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: 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+oFOgAtgTguGhOf5CX0XpInDjxa5RiuP0wXYDb ABgaMNNtjjBA8nwg73SMfDOkiCFvdL+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: vgz0gIHlEsUPrjPYX4LEg/mSXCyrxcGrllWI6b0Ukr+A69Uw482bTl0xIQ5ZNsoFisiAXAHbADMiTKV5tPHvKOv72X0J9yFREOwEeJiEDcdy+UQZyjLfq4RZd1T0agIQrcAUVAW/qXkaGpZINblsrvYMPyb7kPrOJn+m4ZyzD0KTvG3/HWKgVDsQKOBg8boe71NZxfAcyQsfRds9fKyfD+PrCTshC+V+exmNtb0LK54/VwJztBV98GAyoHwUYYEGK8NRsKIJXhN0ucglSfJ/Y7VOFXua+tKfJyIeFArEVA9w+lpF0KxUrLLZ6J2nlIQq1qHn7fGV2qORkn5r+T9v8wowPbdL9OKIv0gJigakuhCd+z3kMpgsUgcOHVDUQcxrsj+9FJcA7TiTha6ZjlmTvkQW+T6DXoFYkztdgZIPrhn4F13gAz8BurTOaQYD2o7gzVdU1iOVT6M9awJgnx6l0DTcAUcF8VGLB1AryDs0Y56pl/08Xw5N811nc7lj7ahozsIPDybeV0+pS4kGFnbzbinYDV3Bg7g10CgyMnf6S8Oan2TNmppPIM3iYce427OKiRRQKl/6h5ya2IyugLoTfoT1qYp/HlCaOA1HW9J+yi+hKwUYq0599iVPS83bRQUioBMbuc04TrnMOlfC2/UuW7yYgFAGrrHs8UhPlBo659moRru+9CRaf/hd10Ld1WqnucM2uP4em2hPM0rUA/6P8O9qYeocoRLbx+YX4MIoEtwVZHJ2m8hemE5KEt 5t5MBWW9f2XmZlZzluSSvqcrunzhPDZoWwAwIPuePqZEULQuLsyomUBJK/LuwcGDL1csbzyc/PfKcfZ3QMf5eb3XFPIv1L8Uxk 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@gatech.edu; 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-Mailman-Approved-At: Wed, 07 Jul 2021 02:28:55 -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:10138 Archived-At: 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