Closed Chris00 closed 6 years ago
It seems a solution is not quite so straightforward. We'd essentially have to make sure from within each Gsl
submodule that Gsl.Error
is referenced in a way that triggers initialization (ideally by just calling initialization explicitly). Even if we put a let () = ...
block in Gsl
, it would not be called unless the user referred to some value within Gsl
directly. This excludes module aliases.
Do you know of any other solution that is guaranteed to trigger initialization code? If not, I'll have to add a call to each module. This is somewhat error-prone, because people adding new modules will have to make sure to do so, too.
Do you know of any other solution that is guaranteed to trigger initialization code?
I'm afraid I don't.
I feared so. Oh well, it wasn't too much work. I have pushed the changes and will make a new release right away.
I believe — I have not checked completely — that with modules aliases if one uses a
Gsl.X
module but notGls.Error
, then the error handler is not initialized. I guess the initialization should be performed in theGsl
module itself.