Welcome! Please see the About page for a little more info on how this works.

+3 votes
in Compiler by
edited by

In clojurescript we have :elide-asserts option that allows at compile time specify if i want to enable asserts or disable. Clojure has similar mechanism with the *assert* var but misses the way to set it before execute/evaluate any other code.

I know, with tool.deps, you have the -e "(set! *assert* false)" but this only works if you are using tool.deps to start your application (pretty common on development but not so common on production).

Another precedent is the clojure.spec.check-asserts system property, that only works for clojure.spec.

Would be awesome to have a similar system property to the clojure.spec.check-asserts for specify the value for *assert* var.

Logged as https://clojure.atlassian.net/browse/CLJ-2554

1 Answer

+5 votes
by
selected by
 
Best answer

Seems reasonable, logged.

...