-
Notifications
You must be signed in to change notification settings - Fork 33
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
put chainrules core in a requires block, rm it from deps #107
Conversation
Codecov ReportPatch coverage:
Additional details and impacted files@@ Coverage Diff @@
## master #107 +/- ##
==========================================
- Coverage 87.08% 86.32% -0.77%
==========================================
Files 3 3
Lines 209 212 +3
==========================================
+ Hits 182 183 +1
- Misses 27 29 +2
☔ View full report in Codecov by Sentry. |
Why is coverage warning that we don't have test coverage for the requires block? |
added tests to check conditional loading of |
Invalidations test is failing with
which seems like not the fault of this PR? |
correct, that can't be related to this PR. it looks like a compile error in TypedSyntax.jl, Cthulu.jl. |
I wonder if this PR was a good idea? ChainRulesCore is (supposed to be) a lightweight interface package (and I've even heard some people argue it should not be put into an extension on Julia >= 1.9 even though that's the common pattern now). Masking it with Requires as done in this PR will 1) break pre-compilation on Julia < 1.9 and 2) add an additional dependency on Julia >= 1.9. |
This reverts commit 3a3f0e4.
My reasoning for putting extension packages in a requires block is that loading CRC in here will prompt loading CRC extensions of every downstream package. As these extensions can be arbitrarily many and arbitrarily large, its worth adding a Requires dependency than paying the cost of all that code loading. |
can you explain? |
Requires breaks pre-compilation. |
ChainRulesCore will be loaded in most projects with AbstractFFTs on Julia <= 1.8 anyway I assume since e.g. SpecialFunctions and many other core packages depend on ChainRulesCore. |
I'm not aware of this. Is there an issue or discourse on this topic? |
I'm not aware of a "standard" reference (e.g., I just happened to learn about the deficiencies of Requires over the years and I assume many other people also "just know") but there a few open issues in Requires.jl that point to different problems. A few problems, including the issue with precompilation, are listed in JuliaLang/Pkg.jl#1285. |
fix #106