Search code examples
clojureleiningen

How to disable Clojure assertions, including preconditions?


What are some good ways to disable Clojure assertions (including preconditions and postconditions) in the REPL? For an arbitrary Leiningen profile?


Solution

  • Per https://github.com/technomancy/leiningen/blob/b82b228/sample.project.clj#L291

    Set :global-vars to {*assert* false} in your profiles.clj.

    You can put the above setting in whatever Leiningen profiles you want.