-
Notifications
You must be signed in to change notification settings - Fork 38
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
support for 1.9 extensions #143
Conversation
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.
Thanks for tackling this!
I'm also inclined towards removing the Juno stuff altogether: as far as I know it's broken, I doubt anyone uses it, Juno itself is discontinued. But this is besides the point of this PR.
Co-authored-by: Mosè Giordano <giordano@users.noreply.github.com>
Co-authored-by: Mosè Giordano <giordano@users.noreply.github.com>
Co-authored-by: Mosè Giordano <giordano@users.noreply.github.com>
Co-authored-by: Mosè Giordano <giordano@users.noreply.github.com>
Co-authored-by: Mosè Giordano <giordano@users.noreply.github.com>
Codecov Report
@@ Coverage Diff @@
## master #143 +/- ##
==========================================
+ Coverage 95.63% 96.91% +1.28%
==========================================
Files 12 9 -3
Lines 756 616 -140
==========================================
- Hits 723 597 -126
+ Misses 33 19 -14
... and 3 files with indirect coverage changes 📣 We’re building smart automated test selection to slash your CI/CD build times. Learn more |
Finally, tests pass hahah. the |
src/Measurements.jl
Outdated
if !isdefined(Base, :get_extension) | ||
using Requires | ||
end | ||
|
||
function __init__() | ||
@require Unitful="1986cc42-f94f-5a68-af5c-568840ba703d" include("unitful.jl") | ||
@require SpecialFunctions="276daf66-3868-5448-9aa4-cd146d93841b" include("special-functions.jl") | ||
@static if !isdefined(Base, :get_extension) | ||
@require Unitful="1986cc42-f94f-5a68-af5c-568840ba703d" include("../ext/MeasurementsUnitfulExt.jl") | ||
@require SpecialFunctions="276daf66-3868-5448-9aa4-cd146d93841b" include("../ext/MeasurementsSpecialFunctionsExt.jl") | ||
@require Juno="e5e0dc1b-0480-54bc-9374-aad01c23163d" include("../ext/MeasurementsJunoExt.jl") | ||
end | ||
end |
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.
At this point just use
@static if !isdefined(Base, :get_extension)
using Requires
function __init__()
@require Unitful="1986cc42-f94f-5a68-af5c-568840ba703d" include("../ext/MeasurementsUnitfulExt.jl")
@require SpecialFunctions="276daf66-3868-5448-9aa4-cd146d93841b" include("../ext/MeasurementsSpecialFunctionsExt.jl")
@require Juno="e5e0dc1b-0480-54bc-9374-aad01c23163d" include("../ext/MeasurementsJunoExt.jl")
end
end
Having a duplicate if
looks pointless and you avoid having an __init__
function completely when not needed.
Co-authored-by: Mosè Giordano <giordano@users.noreply.github.com>
the loading of RecipesBase was done in a backwards-compatible (https://pkgdocs.julialang.org/dev/creating-packages/#Transition-from-normal-dependency-to-extension) but aqua complains about that (and is the reason the Aqua test fail) |
the tests are now explicitly failing for JuliaTesting/Aqua.jl#105 (the Pkg order is different than the order Aqua expects), should be fixed by JuliaTesting/Aqua.jl#106 ? |
Can't you just change the order to make the test pass or am I missing something? |
i will try, hope that a |
Tests seems to pass (now with Aqua.jl) |
Co-authored-by: Mosè Giordano <giordano@users.noreply.github.com>
Ok, I think this is in a good shape now. Thanks again for this! |
if !isdefined(Base,:get_extension) | ||
using Requires | ||
using RecipesBase | ||
include("../ext/MeasurementsRecipesBaseExt.jl") |
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.
Is it intentional that only this single extension is outside of the next block?
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.
this package supports julia 1.0. for some reason, using one isdefined
block failed.
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.
I see, thanks.
moves
SpecialFunctions
,Unitful
andJuno
support into extensions.