This is the mail archive of the kawa@sourceware.org mailing list for the Kawa project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: load-relative trouble


Rahul Lisper wrote:
I am using kawa 1.9.1 (jar downloaded from website). load-relative
doesnt seem to work correctly. I have filed a bug report but I just
wanted to know if there is anyway to define load-relative in scheme
itself?

You probably want to use include-relative (a macro) rather than than load-relative. include and include-relative "load" the specified files at compile-time rather than run-time; you almost certainly that rather than load. load and load-relative don't really work well with Kawa's compiler-base architecture. Nor are they defined in R6RS, for the same reason.

load-relative has the further problem of: relative to what?
Relative to the current source file?  There is no current
source file, since load is a run-time procedure.  Relative
to the current working directory?  load already does that.
For load-relative to be different from load, load-relative
(and possibly load) have to have a side-effect of changing
the current working directory.  Having load change the
current working directory seems wrong.  Having load-relative
but not load change the current working directory seems inconsistent.

A clean solution might be to have a separate "current
load path" variable, which gets set by load - and which is only
used by load-relative.  I guess I can do that.

Of course the really cleanest solution is: don't use load
or load-relative.
--
	--Per Bothner
per@bothner.com   http://per.bothner.com/


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]