brodieG / vetr

Trust, but Verify
79 stars 2 forks source link

Debug-only version of vetr #68

Open brodieG opened 7 years ago

brodieG commented 7 years ago

Likely implemented in combination with #66 and #67. The idea would be to have an option like getOption('vetr.debug') that modifies with_vetr or a variation of it such that it does not install the checks. That way, we can have input and output checks on all our functions, but just as easily we can set that option to FALSE and then the checks are not installed on.load as they normally would be. So all the internal functions would use that mode so we can immediately catch where something went wrong. External functions would probably continue to check their input (and only their inputs).

I don't think it is possible to implement this with on.exit, unfortunately, so we'll need to add a wrapping function which could potentially cause problems with how we match the input calls...