Add namespace DescriptionAttribute to init type


  • Type: Enhancement Enhancement
  • Status: Resolved Resolved
  • Priority: Minor Minor
  • Resolution: Completed
  • Affects Version/s: None
  • Fix Version/s: None
  • Component/s: None
  • Labels:
  • Patch:


leiningen on the JVM uses a small library called bultitude to search the classpath for namespaces. To acheive the same functionality in ClojureCLR we would need to add some descriptive information to the compiler generated _Init_$.

I'm suggesting adding a System.ComponentModel.DescriptionAttribute with a clojure readable string of information describing what namespace(s) this init type loads. This would allow someone to query all the loaded assemblies for namespaces, without necessarily trying to load all of them. Oftentimes the namespace itself is slightly different than what the init type would imply - for instance _Init_$clojure/pprint/column_writer is for the namespace clojure.pprint.

The attached patch, adds a DescriptionAttribute based on the final value of RT.CurrentNSVar after compiling. Conceivably, a single file could load several namespaces, but this seems like a rare case - it could be handled, however, by adding a watch to RT.CurrentNSVar. If this seems useful, the patch can be modified to use this method.


Vote (0)
Watch (0)


  • Created: