GNU bug report logs - #10326
Need to document %load-path, %load-compiled-path, and add %search-load-compiled-path and load-compiled-from-path to API

Previous Next

Package: guile;

Reported by: Ian Hulin <ian <at> hulin.org.uk>

Date: Mon, 19 Dec 2011 15:03:01 UTC

Severity: normal

Done: Andy Wingo <wingo <at> pobox.com>

Bug is archived. No further changes may be made.

Full log


Message #8 received at 10326 <at> debbugs.gnu.org (full text, mbox):

From: Ian Price <ianprice90 <at> googlemail.com>
To: 10326 <at> debbugs.gnu.org
Subject: Re: bug#10326: Need to document %load-path, %load-compiled-path,
	and add %search-load-compiled-path and load-compiled-from-path to API
Date: Fri, 23 Dec 2011 23:46:58 +0000
Ian Hulin <ian <at> hulin.org.uk> writes:

> Section 6.17.6 of the manual could do with a sections for %load-path
> and %load-compiled-path.
>
> e.g.
> — Variable: %load-path
>
>     The list of directories which will currently be searched by
> load-from-path, primitive-load-path and %search-load-path to locate a
> scheme file.
>
> - Variable: %load-compiled-path
>
>     The list of directories which will currently be searched by
> load-compiled-from-path and %search-load-compiled-path to locate a
> compiled scheme file.

%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.

%load-compiled-path seems to be only indirectly referred to in the
%documentation for GUILE_LOAD_COMPILED_PATH and compiled-file-name.

> 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)

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?

> "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."
>
>
> — Scheme Procedure: %search-load-compiled-path filename
> — C Function: scm_sys_search_load_compiled_path (filename)
>
>     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.

Unless you meant %search-load-compiled-path, this sounds similar to the
documented procedure 'compiled-file-name'
>
> — Scheme Procedure: load-compiled-from-path filename
>
>     Similar to load-compiled, but searches for filename in the
> compiled load paths.
If the above is correct, this is just
(compose load-compiled compiled-file-name), yes?
Might be useful for symmetry with 'load-from-path'

-- 
Ian Price

"Programming is like pinball. The reward for doing it well is
the opportunity to do it again" - from "The Wizardy Compiled"




This bug report was last modified 12 years and 73 days ago.

Previous Next


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