-
Notifications
You must be signed in to change notification settings - Fork 100
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
Set JLL packages to be installable but not loadable on 1.0-1.2 #533
Conversation
Codecov Report
@@ Coverage Diff @@
## master #533 +/- ##
=======================================
Coverage 57.43% 57.43%
=======================================
Files 28 28
Lines 2770 2770
=======================================
Hits 1591 1591
Misses 1179 1179
Continue to review full report at Codecov.
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Nice, I do love to see this kind of high level comment. I suggest making the error more accessible to people who see it, while also gently dissuading them from using the workaround.
# to avoid splitting their package versions into pre-1.3 and post-1.3 branches | ||
# if they are willing to engage in the kinds of hoop-jumping they might need | ||
# to in order to install binaries in a JLL-compatible way on 1.0-1.2. | ||
error("Unable to import $(src_name)_jll on Julia versions older than 1.3!") |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
error("Unable to import $(src_name)_jll on Julia versions older than 1.3!") | |
error("""Unable to import $(src_name)_jll on Julia versions older than 1.3. | |
If you must support julia versions < 1.3 and >= 1.3 in the same version of | |
your package, there is a hacky escape hatch available: you can use the | |
deprecated build.jl mechanism for the older versions and put your import | |
of the JLL package inside a version check `if VERSION >= v"1.3" ...`.""") |
17ad7bd
to
9fb41d5
Compare
I made the comment a little bit more explicit as to what kinds of heroics an adventurous dev could embark upon; I don't really want to squeeze all that into an error message for two reasons; the first being that a dev who wants to know why this error is happening will likely look at the source code anyway, and secondly that for the casual user I mostly want this error message to be a "don't do that; use Julia 1.3!". |
Ok then. Personally I'd have liked a subtle hint that there is an escape hatch, but also no good having casual users shooting themselves in the foot. |
This allows users that really want to jump through hoops to avoid bifurcating their packages across the 1.3 divide to do so.