-
Notifications
You must be signed in to change notification settings - Fork 70
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
Unexport numtype #499
Unexport numtype #499
Conversation
In #496, I used the same idea in JuliaDiff/TaylorSeries.jl#289 (see JuliaDiff/TaylorSeries.jl#224). Now, we get the following warning: julia> using TaylorSeries
julia> using IntervalArithmetic
WARNING: using IntervalArithmetic.numtype in module TaylorSeries conflicts with an existing identifier. despite the fact that This PR proposes to not export |
Codecov Report
@@ Coverage Diff @@
## master #499 +/- ##
=======================================
Coverage 91.09% 91.09%
=======================================
Files 25 25
Lines 1785 1785
=======================================
Hits 1626 1626
Misses 159 159
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.
I'm fine with not exporting it, The warning is pretty strange though, since it seems everything works
julia> using IntervalArithmetic
help?> numtype
search: numtype
numtype(::Interval{T}) where {T<:Real} = T
Returns the type of the bounds of the interval.
Example
–––––––––
julia> numtype(1..2)
Float64
julia> using TaylorSeries
WARNING: using IntervalArithmetic.numtype in module TaylorSeries conflicts with an existing identifier.
julia> numtype(1..2)
Float64
julia> methods(numtype)
# 2 methods for generic function "numtype":
[1] numtype(::Interval{T}) where T<:Real in IntervalArithmetic at /home/lferrant/.julia/packages/IntervalArithmetic/AAfrU/src/intervals/functions.jl:36
[2] numtype(x::IntervalBox{N, T}) where {N, T<:Real} in IntervalArithmetic at /home/lferrant/.julia/packages/IntervalArithmetic/AAfrU/src/multidim/intervalbox.jl:44
julia> numtype(1..2)
Float64
I can explain. The
|
A-haa, thank you Christian for the detective work! I didn't notice IntervalArithmetic.jl was an optional dependency, now it make sense! (I probably shouldn't review PRs before breakfast) You mentioned |
Thanks a lot @lucaferranti and @schillic for looking into this. To answer Luca's question, The reason I used the same name is because the functions do really the same in both packages: for a "parametric numeric" (sub)type such as The subtlety becomes important in |
I see, I think it's ok to unexport it as done here. @lbenet as far as I'm concerned this can be merged |
Thanks a lot Luca and Christian for your comments. I'll bump a patch version and then merge. |
No description provided.