From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Ian Hulin Newsgroups: gmane.lisp.guile.bugs Subject: bug#10326: Need to document %load-path, %load-compiled-path, and add %search-load-compiled-path and load-compiled-from-path to API Date: Sat, 24 Dec 2011 12:22:34 +0000 Message-ID: <4EF5C40A.5010400@hulin.org.uk> References: <87liq297gt.fsf@Kagami.home> NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable X-Trace: dough.gmane.org 1324729374 11730 80.91.229.12 (24 Dec 2011 12:22:54 GMT) X-Complaints-To: usenet@dough.gmane.org NNTP-Posting-Date: Sat, 24 Dec 2011 12:22:54 +0000 (UTC) Cc: 10326@debbugs.gnu.org To: Ian Price Original-X-From: bug-guile-bounces+guile-bugs=m.gmane.org@gnu.org Sat Dec 24 13:22:50 2011 Return-path: Envelope-to: guile-bugs@m.gmane.org Original-Received: from lists.gnu.org ([140.186.70.17]) by lo.gmane.org with esmtp (Exim 4.69) (envelope-from ) id 1ReQcj-00085t-Vo for guile-bugs@m.gmane.org; Sat, 24 Dec 2011 13:22:50 +0100 Original-Received: from localhost ([::1]:42216 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ReQcj-0007gQ-DN for guile-bugs@m.gmane.org; Sat, 24 Dec 2011 07:22:49 -0500 Original-Received: from eggs.gnu.org ([140.186.70.92]:53847) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ReQcd-0007gG-J8 for bug-guile@gnu.org; Sat, 24 Dec 2011 07:22:47 -0500 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1ReQcb-0002Yv-Lg for bug-guile@gnu.org; Sat, 24 Dec 2011 07:22:43 -0500 Original-Received: from debbugs.gnu.org ([140.186.70.43]:50675) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ReQcb-0002Yq-EX for bug-guile@gnu.org; Sat, 24 Dec 2011 07:22:41 -0500 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.69) (envelope-from ) id 1ReQes-0007US-A2 for bug-guile@gnu.org; Sat, 24 Dec 2011 07:25:02 -0500 X-Loop: help-debbugs@gnu.org Resent-From: Ian Hulin Original-Sender: debbugs-submit-bounces@debbugs.gnu.org Resent-CC: bug-guile@gnu.org Resent-Date: Sat, 24 Dec 2011 12:25:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 10326 X-GNU-PR-Package: guile X-GNU-PR-Keywords: Original-Received: via spool by 10326-submit@debbugs.gnu.org id=B10326.132472949628780 (code B ref 10326); Sat, 24 Dec 2011 12:25:02 +0000 Original-Received: (at 10326) by debbugs.gnu.org; 24 Dec 2011 12:24:56 +0000 Original-Received: from localhost ([127.0.0.1] helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1ReQel-0007U8-O7 for submit@debbugs.gnu.org; Sat, 24 Dec 2011 07:24:56 -0500 Original-Received: from asmtp1.iomartmail.com ([62.128.201.248]) by debbugs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1ReQei-0007U0-Pd for 10326@debbugs.gnu.org; Sat, 24 Dec 2011 07:24:54 -0500 Original-Received: from asmtp1.iomartmail.com (localhost.localdomain [127.0.0.1]) by asmtp1.iomartmail.com (8.13.8/8.13.8) with ESMTP id pBOCMUTq026647; Sat, 24 Dec 2011 12:22:30 GMT Original-Received: from [192.168.1.100] (cpc13-rdng21-2-0-cust334.15-3.cable.virginmedia.com [82.12.149.79]) (authenticated bits=0) by asmtp1.iomartmail.com (8.13.8/8.13.8) with ESMTP id pBOCMTX9026639; Sat, 24 Dec 2011 12:22:29 GMT User-Agent: Mozilla/5.0 (X11; Linux i686; rv:8.0) Gecko/20111124 Thunderbird/8.0 Original-Newsgroups: gmane.lisp.guile.bugs In-Reply-To: <87liq297gt.fsf@Kagami.home> X-Enigmail-Version: 1.3.4 X-MIME-Autoconverted: from 8bit to quoted-printable by asmtp1.iomartmail.com id pBOCMTX9026639 X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.11 Precedence: list Resent-Date: Sat, 24 Dec 2011 07:25:02 -0500 X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6 (newer, 2) X-Received-From: 140.186.70.43 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:6016 Archived-At: Hi Ian, On 23/12/11 23:46, Ian Price wrote: > Ian Hulin writes: >=20 >> Section 6.17.6 of the manual could do with a sections for >> %load-path and %load-compiled-path. >>=20 >> e.g. =E2=80=94 Variable: %load-path >>=20 >> The list of directories which will currently be searched by=20 >> load-from-path, primitive-load-path and %search-load-path to >> locate a scheme file. >>=20 >> - Variable: %load-compiled-path >>=20 >> The list of directories which will currently be searched by=20 >> load-compiled-from-path and %search-load-compiled-path to locate >> a compiled scheme file. >=20 > %load-path is already documented in 2.0, in section 6.22.1, 6.17.6 > may be a better place for it though, as that is where e.g. > %search-load-path, %load-hook etc. are. >=20 Or a cross-ref,or move it from 6.22 and put the cross-ref in here, depending on Guile's documentation policies. > %load-compiled-path seems to be only indirectly referred to in the=20 > %documentation for GUILE_LOAD_COMPILED_PATH and > compiled-file-name. >=20 >> Also, Guile really needs to provide a %search-load-compiled-path >> and a load-compiled-from-path, it would have been useful in >> LilyPond code, and Manual Section 4.7 (discussing site locations >> says) >=20 > I don't see a %search-load-compiled-path or load-compiled-from-path > in guile 2.0's stable branch. Where these removed? Or have I missed > them? >=20 I don't think they were ever implemented. >> "As with Scheme files, Guile searches a path to find compiled >> .go files, the %load-compiled-path. By default, this path has two >> entries: a path for Guile's files, and a path for site packages. >> You should install your .go files into the latter. Currently >> there is no procedure to get at this path, which is probably a >> bug." >>=20 >>=20 >> =E2=80=94 Scheme Procedure: %search-load-compiled-path filename =E2=80= =94 C >> Function: scm_sys_search_load_compiled_path (filename) >>=20 >> Search %load-compiled-path for the file named filename, which >> must be readable by the current user. If filename is found in the >> list of paths to search or is an absolute pathname, return its >> full pathname. Otherwise, return #f. >=20 > Unless you meant %search-load-compiled-path, this sounds similar to > the documented procedure 'compiled-file-name' No: compiled-file-name does more and different things which are intimately linked in to --auto-compile and its related cache. If you're compiling things to locations outside of this cache (as we need to do for LilyPond) you need to set a directory as an entry in %load-compiled-path and pass this explicitly to compile-file (guild compile if your doing this from within a build environment). We then need to have custom code to load the compiled files during startup. This is because the built-in things in load-from-path et al. rely on compiled-file-name which don't do the right thing if you're compiling to a location outside the --auto-compile cache. So. . . if we want to load our compiled scheme files, possibly produced from guild compile in a build, outside of the --auto-compile cache, we have to use load-compiled, which explicitly says "Load the compiled file named /filename/. The load paths are not searched." >>=20 >> =E2=80=94 Scheme Procedure: load-compiled-from-path filename >>=20 >> Similar to load-compiled, but searches for filename in the=20 >> compiled load paths. > If the above is correct, this is just (compose load-compiled > compiled-file-name), yes? No. See above > Might be useful for symmetry with 'load-from-path' >=20 Yes. Cheers, Ian Hulin