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

When this migrates to 0.7, please fix ambiguities #86

Closed
timholy opened this issue Jul 12, 2018 · 3 comments
Closed

When this migrates to 0.7, please fix ambiguities #86

timholy opened this issue Jul 12, 2018 · 3 comments

Comments

@timholy
Copy link
Contributor

timholy commented Jul 12, 2018

On Julia 0.7, this package currently has ambiguities due to the change in the iteration protocol:

julia> using Test, Missings

julia> detect_ambiguities(Base, Core)
4-element Array{Tuple{Method,Method},1}:
 (next(itr::Missings.EachFailMissing, state) in Missings at /home/tim/.julia/packages/Missings/Fu1R/src/Missings.jl:430, next(itr::I, state::Base.LegacyIterationCompat{I,T,S}) where {I, T, S} in Base at essentials.jl:851)   
 (done(itr::Missings.EachFailMissing, state) in Missings at /home/tim/.julia/packages/Missings/Fu1R/src/Missings.jl:427, done(itr::I, state::Base.LegacyIterationCompat{I,T,S}) where {I, T, S} in Base at essentials.jl:860)   
 (next(itr::Missings.EachReplaceMissing, state) in Missings at /home/tim/.julia/packages/Missings/Fu1R/src/Missings.jl:307, next(itr::I, state::Base.LegacyIterationCompat{I,T,S}) where {I, T, S} in Base at essentials.jl:851)
 (done(itr::Missings.EachReplaceMissing, state) in Missings at /home/tim/.julia/packages/Missings/Fu1R/src/Missings.jl:304, done(itr::I, state::Base.LegacyIterationCompat{I,T,S}) where {I, T, S} in Base at essentials.jl:860)

Some of us include detect_ambiguities as part of our package tests. In my quest to upgrade the Images.jl world to 0.7 this is now one of the last remaining sources of ambiguities. (It comes in only indirectly, presumably through StatsBase.) But, this is not urgent (I can work around it), I just wanted to make sure it's on the agenda eventually.

@nalimilan
Copy link
Member

Looks like the ambiguity is due to the deprecation provided by Julia itself using next(itr::I, state::Base.LegacyIterationCompat{I,T,S}) where {I, T, S}? I'm not sure we can fix it on our end, since these iterators can wrap any iterable, and therefore just pass around its state, which can be of any type.

@timholy
Copy link
Contributor Author

timholy commented Jul 12, 2018

This is in the category "definitely not worth doing until you decide to get rid of start, next, and done altogether" (meaning, when you write your own iterate).

@nickrobinson251
Copy link
Contributor

I beleve this is solved / can be closed 😺

using Missing v0.4.1:

julia> using Test, Missings

julia> detect_ambiguities(Base, Core)
0-element Array{Tuple{Method,Method},1}

julia> VERSION
v"1.0.4"
julia> using Test, Missings

julia> detect_ambiguities(Base, Core)
0-element Array{Tuple{Method,Method},1}

julia> VERSION
v"1.1.1"
julia> using Test, Missings

julia> detect_ambiguities(Base, Core)
0-element Array{Tuple{Method,Method},1}

julia> VERSION
v"1.2.0"
julia> using Test, Missings

julia> detect_ambiguities(Base, Core)
0-element Array{Tuple{Method,Method},1}

julia> VERSION
v"1.3.0-rc1.0"

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

No branches or pull requests

3 participants