[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
The load path
The load path
Sat, 16 Oct 2004 19:52:08 +0200
We all know know that guile is a great extension language. However,
these days I'm writing apps that are Just Guile -- no C frontend at all.
When doing so, I run into some issues with the load path.
First off, the load path for a guile in /usr/bin/guile doesn't
include /usr/local. I was discussing this with Rob today on IRC, and we
agreed that /usr/local should be added onto the load path for a guile
in /usr, so that local packages can be used without hacking LOAD_PATH.
Otherwise you have to run wrapper scripts/environment variable hacks
before running your code. This is analogous to the behavior of the C
compiler, and so shouldn't be too controversial. /usr/local should
precede /usr in the ordering, so that local changes override the
distribution's defaults. This is also in line with the behavior of the C
compiler. (Dunno if $prefix/local should only be added if $prefix==/usr,
Secondly, guile's load path includes ".". This is unexpected. The set of
includes should not depend on the working directory of the user. Also,
as in the case of $PATH and $LD_LIBRARY_PATH, this exposes a security
risk. The only time I can imagine this as being useful is within a
source tree, when you control the environment anyway.
Obviously fixing these cannot be done in the stable branch, because it
will likely break people's code and hacks around the problem. But I'd
like to see it go in to guile 1.7. Sound OK?
Andy Wingo <address@hidden>
- The load path,
Andy Wingo <=