Clear dim before calling list_flatten()#1239
Merged
DavisVaughan merged 1 commit intotidyverse:mainfrom Jan 6, 2026
Merged
Conversation
17 tasks
Member
Author
|
I feel pretty confident about this fix |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
We plan to release vctrs on Jan 15, and purrr was an affected revdep.
In vctrs,
obj_is_list()no longer reportsTRUEfor a list array.This is because most vctrs functions such as
list_drop_empty()andlist_combine()/list_unchop()validate their input usingobj_is_list(), but they aren't well defined on list arrays. In other words when we say "list" in vctrs we really do mean a vector list, not an array list, andsizerelated invariants and C code depend on that definition.This change has affected
array_branch(), since sometimesapply()would return a list array and sometimes it would return a bare list. I think it returns a list array when you apply over >1 dimensions at once, based on looking at the tests.I am clearing the
dimonly when it exists, because if you clear thedimon a bare list then it also drops its names, and we have some tests that ensure that we keep names when only going over 1 dimension.