From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Taylan Kammer Newsgroups: gmane.lisp.guile.bugs Subject: bug#49452: Confusing behavior with (include) used in file in GUILE_LOAD_PATH Date: Wed, 7 Jul 2021 10:29:49 +0200 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="39726"; mail-complaints-to="usenet@ciao.gmane.io" User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:78.0) Gecko/20100101 Thunderbird/78.11.0 To: Vijay Marupudi , 49452@debbugs.gnu.org Original-X-From: bug-guile-bounces+guile-bugs=m.gmane-mx.org@gnu.org Wed Jul 07 10:30:29 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 1m12wv-000AFO-8i for guile-bugs@m.gmane-mx.org; Wed, 07 Jul 2021 10:30:29 +0200 Original-Received: from localhost ([::1]:51064 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1m12wu-0000CY-7T for guile-bugs@m.gmane-mx.org; Wed, 07 Jul 2021 04:30:28 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:55918) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1m12wV-0000C7-NE for bug-guile@gnu.org; Wed, 07 Jul 2021 04:30:04 -0400 Original-Received: from debbugs.gnu.org ([209.51.188.43]:39255) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1m12wV-0005Dc-Cg for bug-guile@gnu.org; Wed, 07 Jul 2021 04:30:03 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1m12wU-00030O-T6 for bug-guile@gnu.org; Wed, 07 Jul 2021 04:30:02 -0400 X-Loop: help-debbugs@gnu.org Resent-From: Taylan Kammer Original-Sender: "Debbugs-submit" Resent-CC: bug-guile@gnu.org Resent-Date: Wed, 07 Jul 2021 08:30: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.162564659911516 (code B ref 49452); Wed, 07 Jul 2021 08:30:02 +0000 Original-Received: (at 49452) by debbugs.gnu.org; 7 Jul 2021 08:29:59 +0000 Original-Received: from localhost ([127.0.0.1]:50800 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1m12wR-0002zd-4u for submit@debbugs.gnu.org; Wed, 07 Jul 2021 04:29:59 -0400 Original-Received: from mail-wr1-f44.google.com ([209.85.221.44]:46961) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1m12wP-0002zB-Rg for 49452@debbugs.gnu.org; Wed, 07 Jul 2021 04:29:58 -0400 Original-Received: by mail-wr1-f44.google.com with SMTP id d12so1438554wre.13 for <49452@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) Original-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) In-Reply-To: <7b37a89f-39a6-1433-daf4-469a40656a6b@gatech.edu> Content-Language: en-US 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:10139 Archived-At: 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. -- Taylan