Versions Compared


  • This line was added.
  • This line was removed.
  • Formatting was changed.
Comment: Migrated to Confluence 4.0


Clojure (1.3.0/2.0) has included new features around marking vars dynamic. This is done via metadata on the var. If a dynamic var is detected and no metadata is provided on the var, it will print a warning message when the namespace is loaded that looks like the following:

Code Block
Var *log-factory* not marked :dynamic true, setting to :dynamic. You should fix this before next release!

While these warnings are trivial to fix when declaring a var with def it isn't currently possible to mark a var dynamic if it is declared via declare.


  • Simply adding metadata on declare would introduce a situation where at the time of defniniton the re-def would overwrite the metadata. Currently there is no way to examine the metadata that exists when re-deffing a var brought in via declare

Use Cases

  • declare
  • functions that take primitives