From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Geert Janssens Newsgroups: gmane.lisp.guile.bugs Subject: bug#18835: load-from-path is inconsistent when looking for a compiled version of the source file Date: Sat, 25 Oct 2014 19:09:09 +0200 Message-ID: <2787802.8pnN87I00l@legolas.kobaltwit.lan> NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="nextPart1675530.NTyNcRlumu" Content-Transfer-Encoding: 7Bit X-Trace: ger.gmane.org 1414271900 11568 80.91.229.3 (25 Oct 2014 21:18:20 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Sat, 25 Oct 2014 21:18:20 +0000 (UTC) To: 18835@debbugs.gnu.org Original-X-From: bug-guile-bounces+guile-bugs=m.gmane.org@gnu.org Sat Oct 25 23:18:12 2014 Return-path: Envelope-to: guile-bugs@m.gmane.org Original-Received: from lists.gnu.org ([208.118.235.17]) by plane.gmane.org with esmtp (Exim 4.69) (envelope-from ) id 1Xi8iy-00055a-9p for guile-bugs@m.gmane.org; Sat, 25 Oct 2014 23:18:12 +0200 Original-Received: from localhost ([::1]:54659 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Xi8ix-0003L4-NC for guile-bugs@m.gmane.org; Sat, 25 Oct 2014 17:18:11 -0400 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:42307) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Xi5BI-0003BX-Li for bug-guile@gnu.org; Sat, 25 Oct 2014 13:31:22 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1Xi5B8-0001FW-QM for bug-guile@gnu.org; Sat, 25 Oct 2014 13:31:12 -0400 Original-Received: from debbugs.gnu.org ([140.186.70.43]:43357) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Xi5B8-0001FS-Mq for bug-guile@gnu.org; Sat, 25 Oct 2014 13:31:02 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.80) (envelope-from ) id 1Xi5B8-0005pg-58 for bug-guile@gnu.org; Sat, 25 Oct 2014 13:31:02 -0400 X-Loop: help-debbugs@gnu.org Resent-From: Geert Janssens Original-Sender: "Debbugs-submit" Resent-CC: bug-guile@gnu.org Resent-Date: Sat, 25 Oct 2014 17:31:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: report 18835 X-GNU-PR-Package: guile X-GNU-PR-Keywords: X-Debbugs-Original-To: bug-guile@gnu.org Original-Received: via spool by submit@debbugs.gnu.org id=B.141425821822367 (code B ref -1); Sat, 25 Oct 2014 17:31:01 +0000 Original-Received: (at submit) by debbugs.gnu.org; 25 Oct 2014 17:30:18 +0000 Original-Received: from localhost ([127.0.0.1]:35455 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1Xi5AO-0005og-W1 for submit@debbugs.gnu.org; Sat, 25 Oct 2014 13:30:17 -0400 Original-Received: from eggs.gnu.org ([208.118.235.92]:38220) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1Xi4qZ-0005JC-U7 for submit@debbugs.gnu.org; Sat, 25 Oct 2014 13:09:49 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1Xi4qK-00044K-Ne for submit@debbugs.gnu.org; Sat, 25 Oct 2014 13:09:42 -0400 Original-Received: from lists.gnu.org ([2001:4830:134:3::11]:39361) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Xi4qK-00044G-LP for submit@debbugs.gnu.org; Sat, 25 Oct 2014 13:09:32 -0400 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:39929) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Xi4qD-0008V0-1s for bug-guile@gnu.org; Sat, 25 Oct 2014 13:09:32 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1Xi4q5-00042T-Iv for bug-guile@gnu.org; Sat, 25 Oct 2014 13:09:25 -0400 Original-Received: from michel.telenet-ops.be ([195.130.137.88]:53947) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Xi4q5-00041Q-9X for bug-guile@gnu.org; Sat, 25 Oct 2014 13:09:17 -0400 Original-Received: from hosting6.kobaltwit.lan ([81.82.192.49]) by michel.telenet-ops.be with bizsmtp id 7V9C1p00P14QHfV06V9ChH; Sat, 25 Oct 2014 19:09:12 +0200 Original-Received: from localhost (localhost [127.0.0.1]) by hosting6.kobaltwit.lan (Postfix) with ESMTP id 7888727589A for ; Sat, 25 Oct 2014 17:09:12 +0000 (UTC) X-Virus-Scanned: amavisd-new at kobaltwit.lan Original-Received: from hosting6.kobaltwit.lan ([127.0.0.1]) by localhost (hosting6.kobaltwit.lan [127.0.0.1]) (amavisd-new, port 10024) with LMTP id iODpsG7xnK4e for ; Sat, 25 Oct 2014 19:09:10 +0200 (CEST) Original-Received: from legolas.kobaltwit.lan (legolas.kobaltwit.lan [192.168.93.4]) by hosting6.kobaltwit.lan (Postfix) with ESMTPS id 41340274BA8 for ; Sat, 25 Oct 2014 19:09:10 +0200 (CEST) User-Agent: KMail/4.14.1 (Linux/3.16.3-200.fc20.x86_64; KDE/4.14.1; x86_64; ; ) X-detected-operating-system: by eggs.gnu.org: GNU/Linux 3.x X-detected-operating-system: by eggs.gnu.org: Error: Malformed IPv6 address (bad octet value). X-Mailman-Approved-At: Sat, 25 Oct 2014 13:30:14 -0400 X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.15 Precedence: list X-detected-operating-system: by eggs.gnu.org: GNU/Linux 3.x X-Received-From: 140.186.70.43 X-Mailman-Approved-At: Sat, 25 Oct 2014 17:18:09 -0400 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.org@gnu.org Original-Sender: bug-guile-bounces+guile-bugs=m.gmane.org@gnu.org Xref: news.gmane.org gmane.lisp.guile.bugs:7620 Archived-At: This is a multi-part message in MIME format. --nextPart1675530.NTyNcRlumu Content-Type: multipart/alternative; boundary="nextPart5320587.iDt9Tjd8NJ" Content-Transfer-Encoding: 7Bit This is a multi-part message in MIME format. --nextPart5320587.iDt9Tjd8NJ Content-Transfer-Encoding: 7Bit Content-Type: text/plain; charset="us-ascii" $ guile --version guile (GNU Guile) 2.0.11 $ config.guess x86_64-unknown-linux-gnu $ rpm -qa | grep guile compat-guile18-1.8.8-7.fc20.x86_64 guile-debuginfo-2.0.11-1.fc20.x86_64 guile-2.0.11-1.fc20.x86_64 guile-devel-2.0.11-1.fc20.x86_64 These steps illustrate the issue: 1. Download the attached file and save it as $HOME/guile/test.scm Note: this is just an example file printing one line to indicate is has successfully been called. Any other scm file will do to illustrate this bug. 2. Run these commands: $ mkdir -p $HOME/guile/ccache $ cd $HOME/guile/ccache $ guild compile -o test.go ../test.scm $ guild compile -o test.scm.go ../test.scm This will generate two compiled versions of the test file, each with a different extension. Now run these commands and observe what happens: $ cd $HOME/guile $ GUILE_LOAD_PATH=$HOME/guile \ GUILE_LOAD_COMPILED_PATH=$HOME/guile/ccache \ guile -c '(load-from-path "test")' => This command will use the file $HOME/guile/ccache/test.go. That is, no auto-compilation is triggered. $ GUILE_LOAD_PATH=$HOME/guile \ GUILE_LOAD_COMPILED_PATH=$HOME/guile/ccache \ guile -c '(load-from-path "test.scm")' => This command will *not* use either of $HOME/guile/ccache/test.go or $HOME/guile/ccache/test.scm.go. Instead it will autocompile test.scm into /test.scm.go and use that one. So there is no way to have the second command use your self-compiled files. >From Andy Wingo's comments on irc, it is expected that the second case would have used the self-compiled $HOME/guile/ccache/test.scm.go. I'm fine with that although using $HOME/guile/ccache/test.go would have made more sense from an outsider's point of view. At least it should be possible to make load-from-path use a self-compiled .go file regardless of whether the argument ends in .scm or not. If more information is needed, feel free to ask. Regards, Geert --nextPart5320587.iDt9Tjd8NJ Content-Transfer-Encoding: 7Bit Content-Type: text/html; charset="us-ascii"

$ guile --version

guile (GNU Guile) 2.0.11

 

$ config.guess

x86_64-unknown-linux-gnu

 

$ rpm -qa | grep guile

compat-guile18-1.8.8-7.fc20.x86_64

guile-debuginfo-2.0.11-1.fc20.x86_64

guile-2.0.11-1.fc20.x86_64

guile-devel-2.0.11-1.fc20.x86_64

 

These steps illustrate the issue:

 

1. Download the attached file and save it as $HOME/guile/test.scm

Note: this is just an example file printing one line to indicate is has

successfully been called. Any other scm file will do to illustrate this bug.

 

2. Run these commands:

$ mkdir -p $HOME/guile/ccache

$ cd $HOME/guile/ccache

$ guild compile -o test.go ../test.scm

$ guild compile -o test.scm.go ../test.scm

 

This will generate two compiled versions of the test file, each with a different extension.

 

Now run these commands and observe what happens:

$ cd $HOME/guile

$ GUILE_LOAD_PATH=$HOME/guile \

GUILE_LOAD_COMPILED_PATH=$HOME/guile/ccache \

guile -c '(load-from-path "test")'

 

=> This command will use the file $HOME/guile/ccache/test.go. That is, no auto-compilation is triggered.

 

$ GUILE_LOAD_PATH=$HOME/guile \

GUILE_LOAD_COMPILED_PATH=$HOME/guile/ccache \

guile -c '(load-from-path "test.scm")'

 

=> This command will *not* use either of $HOME/guile/ccache/test.go or $HOME/guile/ccache/test.scm.go. Instead it will autocompile test.scm into <default-cache-dir>/test.scm.go and use that one.

 

So there is no way to have the second command use your self-compiled files.

 

From Andy Wingo's comments on irc, it is expected that the second case would have used the self-compiled $HOME/guile/ccache/test.scm.go. I'm fine with that although using $HOME/guile/ccache/test.go would have made more sense from an outsider's point of view. At least it should be possible to make load-from-path use a self-compiled .go file regardless of whether the argument ends in .scm or not.

 

If more information is needed, feel free to ask.

 

Regards,

 

Geert

--nextPart5320587.iDt9Tjd8NJ-- --nextPart1675530.NTyNcRlumu Content-Disposition: attachment; filename="test.scm" Content-Transfer-Encoding: 7Bit Content-Type: text/x-scheme; charset="UTF-8"; name="test.scm" (display "Testfile is read")(newline) --nextPart1675530.NTyNcRlumu--