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

Julia 1.9 does not have _maybetail in Base #85

Closed
jaemolihm opened this issue Oct 8, 2022 · 2 comments
Closed

Julia 1.9 does not have _maybetail in Base #85

jaemolihm opened this issue Oct 8, 2022 · 2 comments

Comments

@jaemolihm
Copy link

_maybetail is used twice:

to_indices(A::AbstractQuasiArray, inds, I::Tuple{Any,Vararg{Any}}) =
(@_inline_meta; (to_quasi_index(A, eltype(inds[1]), I[1]), to_indices(A, _maybetail(inds), tail(I))...))
@inline to_indices(A::AbstractQuasiArray, inds, I::Tuple{CartesianIndex, Vararg{Any}}) =
to_indices(A, inds, (I[1].I..., tail(I)...))
@inline to_indices(A::AbstractQuasiArray, inds, I::Tuple{Colon, Vararg{Any}}) =
(uncolon(inds, I), to_indices(A, _maybetail(inds), tail(I))...)

There is a related fix in a different package JuliaArrays/EndpointRanges.jl#25

@dlfivefifty
Copy link
Member

Thanks for this. I always wait until RC stage before making changes in my packages (as sometimes changes on master end up being reverted)

@jagot
Copy link
Member

jagot commented Mar 8, 2023

Bump :)

I've tried replacing _maybetail(inds) by inds[2:end], as suggested here: JuliaLang/julia#23822 (comment), here and in ContinuumArrays.jl.

Additionally, it seems the call signature for uncolon was changed with this PR, which affects to_indices; dropping the second argument seems to work.

However, I'm unsure how to proceed to retain backwards compatibility with Julia < 1.9. I assume that indices.jl contains pieces basically carbon-copied from base/multidimensional.jl. I guess we could have a version guard in indices.jl, but that seems inelegant somehow.

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