From: Bruno H. <br...@cl...> - 2005-02-14 17:58:57
|
Sam wrote: > One more thing. > > where should the module loaders reside? In a directory that depends on the clisp version / installation. Therefore somewhere under *lib-directory* is OK. > for > (REQUIRE "clx") > to work, LOAD must look there. ... or LOAD must be given the absolute pathname of the file. > The natural location is *lib-directory*/src/: > that's where the "optional" macros3.lisp lives. > > Now, who should add *lib-directory*/src/ to *load-paths*? > > 1. user in his ~/.clisprc? yeah, right... Not possible: some users would like to use multiple clisp versions in parallel. > 2. LOAD should always look there no matter what > (either before or after *load-paths*) > > 3. we add *lib-directory*/src/ to *load-paths* in config.lisp > this will add the subdirectory of the build directory, > not the place where the binary distribution will be actually installed > what if *lib-directory* is changed by either -B or in repl? > should we allow evaluatable forms in *load-paths*? > > 4. we add *lib-directory*/src/ to *load-paths* in *init-hooks* > what if *lib-directory* is changed in repl? > what if the user changes *init-hooks* and suddenly (require "clx") > does not work? Uuh, I would not like to make LOAD's behaviour less transparent. Already *LOAD-PATHS* is different from the default mechanism of many tools (which is to consider only the current directory). Adding one more complexity to it is not good. Why not either 5. Let REQUIRE and c-REQUIRE determine the absolute pathname of the file to be loaded, then pass it to LOAD, or 6. Rebind *LOAD-PATHS* around the call to LOAD ? Bruno |