Skip to content
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

Merged
merged 1 commit into from
Dec 2, 2019

Conversation

staticfloat
Copy link
Member

This allows users that really want to jump through hoops to avoid bifurcating their packages across the 1.3 divide to do so.

@codecov-io
Copy link

codecov-io commented Nov 30, 2019

Codecov Report

Merging #533 into master will not change coverage.
The diff coverage is n/a.

Impacted file tree graph

@@           Coverage Diff           @@
##           master     #533   +/-   ##
=======================================
  Coverage   57.43%   57.43%           
=======================================
  Files          28       28           
  Lines        2770     2770           
=======================================
  Hits         1591     1591           
  Misses       1179     1179
Impacted Files Coverage Δ
src/AutoBuild.jl 29.58% <ø> (ø) ⬆️

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 2a144e2...9fb41d5. Read the comment docs.

Copy link
Contributor

@c42f c42f left a 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!")
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
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" ...`.""")

@staticfloat
Copy link
Member Author

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!".

@staticfloat staticfloat merged commit 8c6ed78 into master Dec 2, 2019
@c42f
Copy link
Contributor

c42f commented Dec 3, 2019

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.

@ararslan ararslan deleted the sf/extreme_jll_heroics branch December 3, 2019 01:14
@c42f c42f mentioned this pull request Dec 9, 2019
3 tasks
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants