This is the mail archive of the guile@cygnus.com mailing list for the guile project.
Index Nav: | [Date Index] [Subject Index] [Author Index] [Thread Index] | |
---|---|---|
Message Nav: | [Date Prev] [Date Next] | [Thread Prev] [Thread Next] |
I believe there is a problem in the handling of guile's builtin features, at least relative to slib version 2c3 and guile 1.3 (snapshot 19981110). ice-9/slib.scm defines a list of features which is already supported and thus should not be loaded from the slib. The list is stored into the variable `slib:features', but with slib version 2c3, `require' consults the value of the variable `*features*', thus leading to unnecessary loading of slib code. A test case could be: (set! %load-verbosely #t) (use-modules (ice-9 slib)) (require 'format) which gives the output guile> (set! %load-verbosely #t) guile> (use-modules (ice-9 slib)) ;;; loading /nmc/mbase/share/guile/1.3a/ice-9/slib.scm ;;; loading /nmc/mbase/share/guile/site/slib/require.scm guile> (require 'format) ;;; loading /nmc/mbase/share/guile/site/slib/format ;;; loading /nmc/mbase/share/guile/site/slib/format.scm ;;; loading /nmc/mbase/share/guile/site/slib/strcase ;;; loading /nmc/mbase/share/guile/site/slib/strcase.scm ;;; loading /nmc/mbase/share/guile/site/slib/strport ;;; loading /nmc/mbase/share/guile/site/slib/strport.scm ;;; loading /nmc/mbase/share/guile/site/slib/sc4opt ;;; loading /nmc/mbase/share/guile/site/slib/sc4opt.scm demonstrating that `strport.scm' (call-with-output-string) is loaded, when it shouldn't have been. The following patch is one way to fix the problem: Index: slib.scm =================================================================== RCS file: /nmc/Repository/tools/guile/guile-core/ice-9/slib.scm,v retrieving revision 1.1.1.3 diff -u -r1.1.1.3 slib.scm --- slib.scm 1998/10/20 03:18:39 1.1.1.3 +++ slib.scm 1998/11/12 14:26:48 @@ -127,8 +127,10 @@ '(bignum) '())))) +;;at least with 2c3, the features variable is called `*features*' +(define *features* slib:features) -;;; FIXME: Because uers want require to search the path, this uses +;;; FIXME: Because users want require to search the path, this uses ;;; load-from-path, which probably isn't a hot idea. slib ;;; doesn't expect this function to search a path, so I expect to get ;;; bug reports at some point complaining that the wrong file gets ---------------------------+-------------------------------------------------- Christian Lynbech | Telebit Communications A/S Fax: +45 8628 8186 | Fabrik 11, DK-8260 Viby J Phone: +45 8628 8177 + 28 | email: chl@tbit.dk --- URL: http://www.telebit.dk ---------------------------+-------------------------------------------------- Hit the philistines three times over the head with the Elisp reference manual. - petonic@hal.com (Michael A. Petonic)