-
-
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
precompiled modules can't contain BigInts #15722
Comments
Technically, this is a user error (for specifying |
The user may have a pitch fork and know where you live. |
Another reason to have fully native bigints that only call GMP for tricky functions. |
@vtjnash could you explain how a user could avoid this issue? |
Don't declare the the package as precompilable. |
Is there less heavy-handed way? If it's only a small part of the package which is causing it, that seems like overkill. |
@vtjnash technically this is a documentation error, I couldn't find a glimpse of bigs being discussed at the Module initialization and precompilation topic. ...issues and PRs are not documentation. I'm sure bigs must have some kind of characteristic that makes it obvious (at least for you and a few others) that they wont work in this scenario, it would be better if you guys let others also know and why. |
Anything with pointers. |
And this is actually documented in the module doc in the section about precompilation
Documentation improvements are obviously welcome if that was not obvious/easy to find enough. |
It's not just global constants though. In the other case I showed the constants were inside of a function inside of a module. (Unless constants in a function, when they are inline, somehow go global as an optimization I don't know about) |
It should mention "this includes" and a few examples from Base that it includes. What other Base types have this problem? |
Given that module TestModule
function foo()
170141183460469231731687303715884105728
return 42
end
end |
I also struggled with this over at WignerSymbols.jl, but managed to make it work by storing the constant big number in a |
fix (for BigFloat) in #27331 |
The text was updated successfully, but these errors were encountered: