-
Notifications
You must be signed in to change notification settings - Fork 28
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Warnings to Errors? #16
Comments
The tricky part is making this consistent. If |
I'm not sure I understand - in the case above, where we're using in test/imports.jl
|
In that case you should use What # No error here since MatrixDepot is not loaded
@require MatrixDepot begin
@test LightGraphs.somefn()
end
using MatrixDepot
# Require block executes, `somefun()` is not defined If we were to throw an error here, it would indicate that |
Unfortunately that won't work if the package you want uses macros... this is why Requires.jl is so cool :) |
Fair enough – in that case I think you probably want something bespoke ;) How about something like if isdefined(Main, :MatrixDepot)
eval(quote
using MatrixDepot
# ....
end)
end You could macroify that and it wouldn't be so bad. |
This is a bit dangerous (and causes tests to succeed when the functions that are being tested have errors). Is there a way to specify "rethrow errors"?
The text was updated successfully, but these errors were encountered: