-
-
Notifications
You must be signed in to change notification settings - Fork 5.5k
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
Static compilation doesn't use __init__
#18115
Comments
This is intentional; when code is only being compiled we don't consider it to be at run time. The reasoning was that It's also worth nothing that the same error would happen if you used |
Yes. I also confirmed this works with incremental compilation, as intended. |
For some reason I was under the impression that |
Should this be documented somewhere? |
yes, it does seem like http://docs.julialang.org/en/latest/manual/modules/#module-initialization-and-precompilation may lead someone to expect otherwise |
Reopened as a documentation issue. |
It appears that static compilation does not call the
__init__
. Take the two modules below as an example:Calling
demo()
from within the REPL works as expected with and without pre-compilation but static compilation produces the following exception:The text was updated successfully, but these errors were encountered: