[Openmcl-devel] COMPILE-FILE maybe-bug

Tim Bradshaw tfb at tfeb.org
Wed Sep 29 11:27:00 UTC 2010


I've been trying to understand why the ASDF that gets dumped into the IDE is sometimes broken - in particular the package is there but the features are not always there - and I think I've understood what is happening.

But it may be that my idea of what *should* happen is just wrong.

What is happening is that when doing (compile-file "foo" :load t) on a file which in turn says

(eval-when (:load-toplevel :compile-toplevel :execute)
  (require :bar ...))

Then not all the things that should happen when loading whatever provides :bar do happen: in particular if it adds features (via (pushnew ... ) they don't get added.

But perhaps I'm wrong and they should not get added - I can see that the problem is that the thing that provides the features is getting loaded at compile time, and maybe it's right that it should not side-effect things that way.

I think they should side-effect the environment the compiler runs in in fact: if you say (eval-when (:compile ...) ...) you're asking for that.

Attached to this is a tiny zip file with a minimal example, I think.  If you compile worth.lisp, then in a separate image do a (compile-file "crun" :load t) you should see that *modules* does have things from worth on it, but *features* does not.

If people agree this is a bug I'll open an issue for it.

-------------- next part --------------
A non-text attachment was scrubbed...
Name: crunworth.zip
Type: application/zip
Size: 1531 bytes
Desc: not available
URL: <http://lists.clozure.com/pipermail/openmcl-devel/attachments/20100929/5da52284/attachment.zip>


More information about the Openmcl-devel mailing list