Skip to content

Conversation

@adienes
Copy link
Member

@adienes adienes commented Jan 6, 2026

particularly important after #59500 so that ranges match vectors!

@adienes adienes added bugfix This change fixes an existing bug ranges Everything AbstractRange equality Issues relating to equality relations: ==, ===, isequal backport 1.13 labels Jan 6, 2026
@adienes adienes changed the title order ranges by firstindex before by values (like vectors) compare ranges by firstindex before by values (like vectors) Jan 6, 2026
@adienes
Copy link
Member Author

adienes commented Jan 6, 2026

the old behavior is explicitly tested for, but I think those tests are incorrect, right?

@adienes adienes requested a review from jishnub January 6, 2026 18:20
@jishnub
Copy link
Member

jishnub commented Jan 6, 2026

This seems to have some overlap with #30950, although it's much smaller in scope. I fear this will be complicated and might be breaking. The axis of an axis is often ignored -- incorrectly -- but that behavior is ancient.

@adienes
Copy link
Member Author

adienes commented Jan 6, 2026

note the following consequence:

julia> using OffsetArrays

julia> a1 = OffsetArray(Int[], 4);

julia> a2 = OffsetArray(Int[], 5);

julia> a1 == a2, axes(a1) == axes(a2)
(true, true)

julia> cmp(a1, a2), cmp(axes(a1), axes(a2))
(-1, -1)

ancient or not, shouldn't we fix it?

@jishnub
Copy link
Member

jishnub commented Jan 8, 2026

Please go ahead by all means, I'm not vetoing this. I'll just be interested in a PkgEval run to see if this impacts the ecosystem.

@jishnub jishnub added the needs nanosoldier run This PR should have benchmarks run on it label Jan 8, 2026
@adienes
Copy link
Member Author

adienes commented Jan 8, 2026

@nanosoldier runtests()

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

backport 1.13 bugfix This change fixes an existing bug equality Issues relating to equality relations: ==, ===, isequal needs nanosoldier run This PR should have benchmarks run on it ranges Everything AbstractRange

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants