I’m building a package and have started to use asserts in all my functions that check dimensions of the function arguments.
As most of these functions are called from my own code only, these asserts should not be there once I’m finished.
To this end I have enclosed them with
so that the debugging_mode variable is checked during compilation but not anymore during runtime. Looking into the generated llvm code made me believe so.
The problem is, that it is difficult to change the variable and force a recompilation. The only way I found reliable was to restart Julia.
Therefore my question ist: How should I make these assertions (or should i use a different mechanism) so that I can switch them on and off during compile time and how do I then force recompilation of my functions?
(In case you wonder: I’m using Revised but it doesn’t help here)