Skip to content

Conversation

@Moelf
Copy link

@Moelf Moelf commented Oct 24, 2023

Also doc test seems to be failing on 1.10+ because of the @NamedTuple printing

@Moelf Moelf changed the title add Aqua and fix ambiguity add Aqua.jl tests and fix ambiguity Oct 24, 2023
@Moelf
Copy link
Author

Moelf commented Oct 24, 2023

@LilithHafner can you review this? I guess this repo isn't very active these days.

return S′ isa StructArrayStyle ? typeof(S′)(Val{N′}()) : StructArrayStyle{typeof(S′), N′}()
end
function BroadcastStyle(
::Union{SparseArrays.HigherOrderFns.SparseMatStyle, SparseArrays.HigherOrderFns.SparseVecStyle},
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The aqua addition looks good to me. CI is all red here, even when it was green on master Saying something about "SparseArrays" not found. That should probably get fixed. Maybe this line?

I have not reviewed the changes to src/structarray.jl.

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

should I import SparseArrays here?

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Seems like a bad idea to add SparseArrays as a dependency just for this. Maybe a weak dependency if necessary?

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

There is a SparseArrays extension now, so this may be moved to that?

::Union{SparseArrays.HigherOrderFns.SparseMatStyle, SparseArrays.HigherOrderFns.SparseVecStyle},
::StructArrays.StructArrayStyle{S, 0}
)
return Unknown()
Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

not sure what's the correct style here, but before it would result in ambiguity error so this isn't regression

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I don't like that. Ambiguity errors exist for a reason. If it is truly ambiguous then somebody who understands what is going on needs to disambiguate it, setting it to Unknown() could be worse than an ambiguity error.

return S′ isa StructArrayStyle ? typeof(S′)(Val{N′}()) : StructArrayStyle{typeof(S′), N′}()
end
function BroadcastStyle(
::Union{SparseArrays.HigherOrderFns.SparseMatStyle, SparseArrays.HigherOrderFns.SparseVecStyle},
Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

should I import SparseArrays here?

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

Successfully merging this pull request may close these issues.

3 participants