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

Type for broadcast(-, 1:2:∞, 0.3) changed in Julia 1.8 #89

Open
KristofferC opened this issue Feb 19, 2022 · 2 comments
Open

Type for broadcast(-, 1:2:∞, 0.3) changed in Julia 1.8 #89

KristofferC opened this issue Feb 19, 2022 · 2 comments

Comments

@KristofferC
Copy link

# 1.8
julia> broadcast(-, 1:2:∞, 0.3) |> typeof
StepRangeLen{Infinities.Infinity, Float64, Int64, Integer}

# 1.7
julia> broadcast(-, 1:2:∞, 0.3) |> typeof
InfiniteArrays.InfStepRange{Float64, Float64}

This breaks some stuff later:

julia> broadcast(-, 1:2:∞, 0.3)
Error showing value of type StepRangeLen{Infinities.Infinity, Float64, Int64, Integer}:
ERROR: MethodError: no method matching Infinities.Infinity(::Float64)
Closest candidates are:
  (::Type{T})(::T) where T<:Number at ~/julia/usr/share/julia/base/boot.jl:772
  Infinities.Infinity() at ~/.julia/packages/Infinities/WAhkk/src/Infinities.jl:24
  (::Type{T})(::AbstractChar) where T<:Union{AbstractChar, Number} at ~/julia/usr/share/julia/base/char.jl:50
  ...
Stacktrace:
  [1] unsafe_getindex(r::StepRangeLen{Infinities.Infinity, Float64, Int64, Integer}, i::Int64)
    @ Base ./range.jl:940
  [2] show(io::IOContext{Base.TTY}, r::StepRangeLen{Infinities.Infinity, Float64, Int64, Integer})
    @ Base ./range.jl:0
  [3] show(io::IOContext{Base.TTY}, #unused#::MIME{Symbol("text/plain")}, r::StepRangeLen{Infinities.Infinity, Float64, Int64, Integer})
...

Maybe something has to be overloaded for StepRangeLen as well?

@dlfivefifty
Copy link
Member

Is 1.8 close to RC? I tend to wait to RC before making any changes (I was bit once changing + to .+ only to have to change it all back.)

@KristofferC
Copy link
Author

No, not really close, but the process of getting to an RC is done by checking that there aren't a bunch of regressions in package tests so having package authors ensure that their package work on nightly greatly helps with getting an RC earlier since the PkgEval logs will be cleaner.

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

2 participants