JuliaTesting/Mocking.jl

Pre-compilation and Mocking don't mix

Closed this issue · 4 comments

omus commented

Currently pre-compilation can cause Mocking.jl to fail since the @mock macro is treated as a no-op when not testing. One reasonable workaround is to disable the compilecache when testing package that both use pre-compilation and Mocking (JuliaLang/julia#17200). A potentially better solution is to disallow precompilation for a specific import or using call.

omus commented

Mostly mitigated by JuliaLang/julia#17200 but probably worth finding a solution that doesn't require user interaction.

omus commented

Note there was an issue with a warning during precompilation that has been fixed in #5

omus commented

PR #12 should address this problem with no user interaction. I'll leave this issue open until the force flag is dropped.

omus commented

We no longer have to mess with pre-compilation as of: #68