GNU bug report logs - #18835
load-from-path is inconsistent when looking for a compiled version of the source file

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: Geert Janssens <info@HIDDEN>; dated Sat, 25 Oct 2014 17:31:01 UTC; Maintainer for guile is bug-guile@HIDDEN.

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


Received: (at submit) by debbugs.gnu.org; 25 Oct 2014 17:30:18 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Sat Oct 25 13:30:17 2014
Received: from localhost ([127.0.0.1]:35455 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.80)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1Xi5AO-0005og-W1
	for submit <at> debbugs.gnu.org; Sat, 25 Oct 2014 13:30:17 -0400
Received: from eggs.gnu.org ([208.118.235.92]:38220)
 by debbugs.gnu.org with esmtp (Exim 4.80)
 (envelope-from <info@HIDDEN>) id 1Xi4qZ-0005JC-U7
 for submit <at> debbugs.gnu.org; Sat, 25 Oct 2014 13:09:49 -0400
Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71)
 (envelope-from <info@HIDDEN>) id 1Xi4qK-00044K-Ne
 for submit <at> debbugs.gnu.org; Sat, 25 Oct 2014 13:09:42 -0400
X-Spam-Checker-Version: SpamAssassin 3.3.2 (2011-06-06) on eggs.gnu.org
X-Spam-Level: 
X-Spam-Status: No, score=0.8 required=5.0 tests=BAYES_50,HTML_MESSAGE
 autolearn=disabled version=3.3.2
Received: from lists.gnu.org ([2001:4830:134:3::11]:39361)
 by eggs.gnu.org with esmtp (Exim 4.71)
 (envelope-from <info@HIDDEN>) id 1Xi4qK-00044G-LP
 for submit <at> debbugs.gnu.org; Sat, 25 Oct 2014 13:09:32 -0400
Received: from eggs.gnu.org ([2001:4830:134:3::10]:39929)
 by lists.gnu.org with esmtp (Exim 4.71)
 (envelope-from <info@HIDDEN>) id 1Xi4qD-0008V0-1s
 for bug-guile@HIDDEN; Sat, 25 Oct 2014 13:09:32 -0400
Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71)
 (envelope-from <info@HIDDEN>) id 1Xi4q5-00042T-Iv
 for bug-guile@HIDDEN; Sat, 25 Oct 2014 13:09:25 -0400
Received: from michel.telenet-ops.be ([195.130.137.88]:53947)
 by eggs.gnu.org with esmtp (Exim 4.71)
 (envelope-from <info@HIDDEN>) id 1Xi4q5-00041Q-9X
 for bug-guile@HIDDEN; Sat, 25 Oct 2014 13:09:17 -0400
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
Received: from localhost (localhost [127.0.0.1])
 by hosting6.kobaltwit.lan (Postfix) with ESMTP id 7888727589A
 for <bug-guile@HIDDEN>; Sat, 25 Oct 2014 17:09:12 +0000 (UTC)
X-Virus-Scanned: amavisd-new at kobaltwit.lan
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 <bug-guile@HIDDEN>;
 Sat, 25 Oct 2014 19:09:10 +0200 (CEST)
Received: from legolas.kobaltwit.lan (legolas.kobaltwit.lan [192.168.93.4])
 by hosting6.kobaltwit.lan (Postfix) with ESMTPS id 41340274BA8
 for <bug-guile@HIDDEN>; Sat, 25 Oct 2014 19:09:10 +0200 (CEST)
From: Geert Janssens <info@HIDDEN>
To: bug-guile@HIDDEN
Subject: 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@HIDDEN>
User-Agent: KMail/4.14.1 (Linux/3.16.3-200.fc20.x86_64; KDE/4.14.1; x86_64; ; )
MIME-Version: 1.0
Content-Type: multipart/mixed; boundary="nextPart1675530.NTyNcRlumu"
Content-Transfer-Encoding: 7Bit
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-Received-From: 2001:4830:134:3::11
X-Spam-Score: -5.0 (-----)
X-Debbugs-Envelope-To: submit
X-Mailman-Approved-At: Sat, 25 Oct 2014 13:30:14 -0400
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.15
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <http://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <http://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: <http://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: -5.0 (-----)

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 <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
Content-Transfer-Encoding: 7Bit
Content-Type: text/html; charset="us-ascii"

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0//EN" "http://www.w3.org/TR/REC-html40/strict.dtd">
<html><head><meta name="qrichtext" content="1" /><style type="text/css">
p, li { white-space: pre-wrap; }
</style></head><body style=" font-family:'Monospace'; font-size:10pt; font-weight:400; font-style:normal;">
<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px; -qt-user-state:0;">$ guile --version</p>
<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px; -qt-user-state:0;">guile (GNU Guile) 2.0.11</p>
<p style="-qt-paragraph-type:empty; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px; ">&nbsp;</p>
<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px; -qt-user-state:0;">$ config.guess </p>
<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px; -qt-user-state:0;">x86_64-unknown-linux-gnu</p>
<p style="-qt-paragraph-type:empty; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px; ">&nbsp;</p>
<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px; -qt-user-state:0;">$ rpm -qa | grep guile</p>
<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px; -qt-user-state:0;">compat-guile18-1.8.8-7.fc20.x86_64</p>
<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px; -qt-user-state:0;">guile-debuginfo-2.0.11-1.fc20.x86_64</p>
<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px; -qt-user-state:0;">guile-2.0.11-1.fc20.x86_64</p>
<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px; -qt-user-state:0;">guile-devel-2.0.11-1.fc20.x86_64</p>
<p style="-qt-paragraph-type:empty; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px; ">&nbsp;</p>
<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px; -qt-user-state:0;">These steps illustrate the issue:</p>
<p style="-qt-paragraph-type:empty; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px; ">&nbsp;</p>
<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px; -qt-user-state:0;">1. Download the attached file and save it as $HOME/guile/test.scm</p>
<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px; -qt-user-state:0;">Note: this is just an example file printing one line to indicate is has</p>
<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px; -qt-user-state:0;">successfully been called. Any other scm file will do to illustrate this bug.</p>
<p style="-qt-paragraph-type:empty; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px; ">&nbsp;</p>
<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px; -qt-user-state:0;">2. Run these commands:</p>
<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px; -qt-user-state:0;">$ mkdir -p $HOME/guile/ccache</p>
<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px; -qt-user-state:0;">$ cd $HOME/guile/ccache</p>
<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px; -qt-user-state:0;">$ guild compile -o test.go ../test.scm</p>
<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px; -qt-user-state:0;">$ guild compile -o test.scm.go ../test.scm</p>
<p style="-qt-paragraph-type:empty; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px; ">&nbsp;</p>
<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px; -qt-user-state:0;">This will generate two compiled versions of the test file, each with a different extension.</p>
<p style="-qt-paragraph-type:empty; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px; ">&nbsp;</p>
<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px; -qt-user-state:0;">Now run these commands and observe what happens:</p>
<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px; -qt-user-state:0;">$ cd $HOME/guile</p>
<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px; -qt-user-state:0;">$ GUILE_LOAD_PATH=$HOME/guile \</p>
<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px; -qt-user-state:0;">  GUILE_LOAD_COMPILED_PATH=$HOME/guile/ccache \</p>
<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px; -qt-user-state:0;">  guile -c '(load-from-path &quot;test&quot;)'</p>
<p style="-qt-paragraph-type:empty; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px; ">&nbsp;</p>
<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px; -qt-user-state:0;">=&gt; This command will use the file $HOME/guile/ccache/test.go. That is, no auto-compilation is triggered.</p>
<p style="-qt-paragraph-type:empty; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px; ">&nbsp;</p>
<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px; -qt-user-state:0;">$ GUILE_LOAD_PATH=$HOME/guile \</p>
<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px; -qt-user-state:0;">  GUILE_LOAD_COMPILED_PATH=$HOME/guile/ccache \</p>
<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px; -qt-user-state:0;">  guile -c '(load-from-path &quot;test.scm&quot;)'</p>
<p style="-qt-paragraph-type:empty; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px; ">&nbsp;</p>
<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px; -qt-user-state:0;">=&gt; 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 &lt;default-cache-dir&gt;/test.scm.go and use that one.</p>
<p style="-qt-paragraph-type:empty; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px; ">&nbsp;</p>
<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px; -qt-user-state:0;">So there is no way to have the second command use your self-compiled files.</p>
<p style="-qt-paragraph-type:empty; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px; ">&nbsp;</p>
<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px; -qt-user-state:0;">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.</p>
<p style="-qt-paragraph-type:empty; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px; ">&nbsp;</p>
<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px; -qt-user-state:0;">If more information is needed, feel free to ask.</p>
<p style="-qt-paragraph-type:empty; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px; ">&nbsp;</p>
<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px; -qt-user-state:0;">Regards,</p>
<p style="-qt-paragraph-type:empty; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px; ">&nbsp;</p>
<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px; -qt-user-state:0;">Geert</p></body></html>
--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--





Acknowledgement sent to Geert Janssens <info@HIDDEN>:
New bug report received and forwarded. Copy sent to bug-guile@HIDDEN. Full text available.
Report forwarded to bug-guile@HIDDEN:
bug#18835; 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: Fri, 31 Oct 2014 17:00:04 UTC

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