-
-
Notifications
You must be signed in to change notification settings - Fork 192
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
Add a blacklist for precompile statements, and allow users to override the blacklist #333
Conversation
@ianshmean could you try out this PR and let me know if it solves your issues? I would recommend using a custom blacklist that looks something like this: precompile_blacklist = [r"permutedims"i] This will cause anything with |
Codecov Report
@@ Coverage Diff @@
## master #333 +/- ##
=======================================
Coverage 81.18% 81.18%
=======================================
Files 2 2
Lines 303 303
=======================================
Hits 246 246
Misses 57 57
Continue to review full report at Codecov.
|
Seems to be working. It helped me get past |
I haven't managed to skip the |
Yeah, I am not sure this is a feasible solution since other functions can probably end up calling it. And |
@ianshmean What happens if your blacklist is |
I wonder if |
I can try that. I’ve actually found that my package doesn’t fail on an amd64 Linux machine while it does on the aarch64 system I’ve been testing. I’ve outputted all the precompile statements from both and I’m going to do a symdiff on them to figure out what’s different |
Not so simple..
|
Isn't better to use You can also use cc: @timholy |
@ianshmean I think you’re going to have to do a bisect on all of the precompile statements on the platform that is failing. Probably run it overnight. |
We already kinda did that but AFAIU even if you remove the one that fails, another one can just take its place because running one |
@KristofferC What are your thoughts on this PR? It seems like it hasn’t actually helped Ian fix his problem. Should we close this PR and hope for a fix from upstream (Julia and/or LLVM)? |
I think so yes. |
Closes #329
Related to #295
Related to JuliaLang/julia#31156
This is a replacement for #329. This PR adds a blacklist for precompile statements that are known to crash Julia when you try to compile them into a sysimage. The differences between this PR and #329 are:
AbstractString
s. In this PR, members of the blacklist may be eitherAbstractString
s orRegex
es. This allows a user to block any precompile statements that match any pattern in a set of given patterns.cc: @KristofferC
@ianshmean may be interested in this, especially the
Regex
part (see his comment here: #295 (comment))Just a quick word about the motivation for this PR. I don't think it makes sense for the default blacklist to, for example, blacklist all
permutedims
methods. That is way too aggressive for most users. So we want to have a relatively conservative blacklist. But we want users to be able to provide a custom blacklist as well. And because a user may need to, for example, block methods withArray{Bool, N}
for all values ofN
, we need to allow them to passRegex
es for ultimate customization ability. But users that are not experienced with regexes may instead just want to pass a vector of strings. That is why this PR supports bothRegex
es andAbstractString
s.