Open staticfloat opened 3 years ago
https://github.com/JuliaPackaging/Requires.jl/blob/7ff79f692d43658c285a80aa10dc29fa29921049/src/require.jl#L45-L51 I guess. I don't really understand why you wouldn't just error there, something is cleary broken.
Seems to me that we should rethrow(exc)
?
Imo yes. But maybe there is some good reason. I guess it can be argued that if the @requires
part is an optional addition of functionality, failing to load that shouldn't be a hard error. But it is unclear what state the system is in after that part errors so in my opinion error is probably the right thing to do.
I have found a few usages in the wild of
@require
enabling test sets dynamically, but it has some surprising interactions in that a failing test within the nested@require
-@testset
gets printed, but does not impact Julia's return value. Example:It looks to me like a failing test set might get caught by some generic error handling routine.