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

Failing tests on 1.9 #285

Closed
evetion opened this issue Mar 31, 2022 · 5 comments
Closed

Failing tests on 1.9 #285

evetion opened this issue Mar 31, 2022 · 5 comments

Comments

@evetion
Copy link
Collaborator

evetion commented Mar 31, 2022

As seen in master and in recent PRs (#284), nightly fails with

MethodError: no method matching regenerateoverviews!(::ArchGDAL.IRasterBand{UInt8}, ::Vector{Matrix{UInt8}})
https://github.com/yeesian/ArchGDAL.jl/runs/5513853907?check_suite_focus=true#step%3A6%3A165=

@evetion evetion changed the title Failing tests on 1.8 Failing tests on 1.9 Mar 31, 2022
@yeesian
Copy link
Owner

yeesian commented Apr 1, 2022

Thank you for filing this; I looked at the code and it seems that everything's working as-intended, but please correct me if I'm wrong!

In the meantime, let me doublecheck that failure on nightlies are not a blocker for merging PRs

@evetion
Copy link
Collaborator Author

evetion commented Apr 1, 2022

Ok, from what I can see, in the failing function regenerateoverviews!(::T, ::Vector{<:ArchGDAL.AbstractRasterBand}) Julia normally dispatches fine on Vector{<:ArchGDAL.AbstractRasterBand}. In Julia 1.9 it doesn't and walks all the way up its supertypes to Matrix as ArchGDAL.AbstractRasterBand <: AbstractDiskArray{T,2} <: AbstractArray{T,N}.

This was wrong, what happens is that in the test we do:
[overview, AG.getoverview(destband, 2)]

where overview is a ArchGDAL.RasterBand{UInt8} and the second is a ArchGDAL.IRasterBand{UInt8}. These different types (note the I) joined in a vector leads to Vector{ArchGDAL.AbstractRasterBand{UInt8}} in 1.8 and below, but on 1.9 it actually walks upwards to Vector{Matrix{UInt8}}.

Will file an upstream bug report.

@yeesian
Copy link
Owner

yeesian commented Apr 2, 2022

I really appreciate your investigation and follow-up in JuliaLang/julia#44821. The lack of stability in the common type for vectors seems slightly concerning. Should I consider setting up a system of promotion rules defined for the types in this package?

@evetion
Copy link
Collaborator Author

evetion commented Apr 6, 2022

It seems wise to add promotion rules indeed, but only for the (probably small amount) of cases where it's needed. In the test we triggered this by mixing both RasterBand and IRasterBand, the same is probably needed for Geometry, but I don't know more cases. I also don't expect a user to quickly mix these, as the public interface mostly works with the I variants.

@maxfreu
Copy link
Contributor

maxfreu commented Jun 12, 2023

I think this can be closed, right? JuliaLang/julia#47893

@evetion evetion closed this as completed Jun 12, 2023
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