I did take a little bit of a look at it and it is both simple and complex. When you're not AOT compiling code, the symbol that's creating the namespace gets wrapped with metadata when the ns macro is evaluated. This metadata is then explicitly moved on to the namespace.
When the compiler runs, it doesn't seem that it is so explicit about namespace creation. It essentially does (in-ns 'foo) which will create the ns foo on the fly if appropriate. There is currently no code generated to do anything *explicit* with the namespace and, therefore, no place to decide that the namespace has metadata and tack it on. I got about as far as I could eyeballing the code and wanted to get it up in the debugger, but I don't have a Java debug environment set up and my Clojure time has been super limited lately owing to all sorts of other things happening in my life (I am *so* jealous of you guys who are doing makor Clojure projects). If I get some time, I'll dig in enough to make a patch, but it might be a few more months. I feel like the fix will be pretty easy, once the real flow is well-understood. This is my first foray into the compiler, so there's a lot to understand (though it's all pretty straightforward). So, Phil, if you want to take it from there, it would be great. If you don't, I'll keep it on my list. Tom On Nov 23, 2:38 am, Lauri Pesonen <[email protected]> wrote: > 2009/11/23 Phil Hagelberg <[email protected]>: > > > > > I noticed an odd bug when working on the help command for leiningen. It > > uses docstrings on metadata for help output, but when AOTing the > > project, the docstrings (as well as all other metadata) would be > > lost. Note that this doesn't happen when metadata is added to the > > namespace after the fact as is the case with clojure.core and > > alter-meta!. > > > Any idea what might be causing this? I'd like to dig deeper but am > > unsure where to look. > > There's a ticket for it > > https://www.assembla.com/spaces/clojure/tickets/130-Namespace-metadat... > > but I don't think anyone's spent any time in trying to fix it. > > > thanks, > > Phil > > -- > ! Lauri -- You received this message because you are subscribed to the Google Groups "Clojure" group. To post to this group, send email to [email protected] Note that posts from new members are moderated - please be patient with your first post. To unsubscribe from this group, send email to [email protected] For more options, visit this group at http://groups.google.com/group/clojure?hl=en
