Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
test sandboxed eval with macro introspection
This adds a regression test for the recent issue [1] where building docs for packages depending on Qi was failing due to the use of macro introspection functionality in the macro-debugger library inside a sandboxed evaluator. This was recently fixed by handling the runtime error resulting from requiring the macro debugger library (which is due to the sandboxed evaluator disallowing macro introspection). This regression test validates the bug and the fix. The coverage checker was still showing the lambda used in "monkey patching" the macro debugger utility as uncovered by tests. My guess is that this is because the coverage tool only counts code as covered if the evaluator used in the test runner evaluates those lines, whereas in the present case, the code is "covered" by a sandboxed evaluator we construct in the test rather than the test runner itself. Assuming this is the right explanation, I've placed the original fix inside a submodule---by default, the coverage checker ignores all submodules [2] for the purposes of coverage. So in cases where we are sure some code needn't be covered (or which we know is covered but isn't detected, as in this case), we can use this recipe as a standard way to add an exclusion to coverage. [1]: https://github.com/drym-org/qi/wiki/Qi-Meeting-Mar-29-2024 [2]: https://docs.racket-lang.org/cover/api.html#%28def._%28%28lib._cover%2Fmain..rkt%29._irrelevant-submodules%29%29
- Loading branch information