0

I am using Leiningen 1.7.1 and Clojure 1.3.0. My question is what, if any, is the relationship between the :aot compiler directive and an error message indicating my defs are not dynamic?

Here are the details:

If I remove the :aot directive from any of my project.clj files (two libraries and a main that depends on them), I get Warning: delimiter not declared dynamic and thus is not dynamically rebindable.

If I modify statements like this

(def bene-ssn-idx 16)
(def gic-ssn-idx 2)

to include the dynamic directive, I get this run-time error

Exception in thread "main" java.lang.IllegalStateException: Can't dynamically bind non-dynamic var: clojure-csv.core/strict

At one point I remember hearing there was a problem in Clojure 1.3 concerning the first warning message and that it would be fixed.

I'm perfectly happy to live with a longer build due to :aot, but am still wondering what the warning and error mean, in addition to why removing :aot produces the warning.

octopusgrabbus
  • 10,555
  • 15
  • 68
  • 131

1 Answers1

2

You are using a version of clojure-csv that is not Clojure 1.3-compliant: its earmuffed vars are not declared dynamic. I don't know the details on how using ahead-of-time compilation prevents that problem.

Marko Topolnik
  • 195,646
  • 29
  • 319
  • 436
  • Thanks for your answer. What gave away the clojure-csv version? – octopusgrabbus Apr 10 '12 at 18:29
  • This: "Can't dynamically bind non-dynamic var: clojure-csv.core/strict". This error can occur only if the mentioned var was not marked dynamic and I reasonably expect that clojure-csv has by now got a 1.3-compliant realease. – Marko Topolnik Apr 10 '12 at 18:32