Skip to content

Eliminate vctrs::vec_cast_list() #137

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

Merged
merged 6 commits into from
Sep 26, 2022
Merged

Eliminate vctrs::vec_cast_list() #137

merged 6 commits into from
Sep 26, 2022

Conversation

hadley
Copy link
Member

@hadley hadley commented Sep 25, 2022

Fixes #136

@hadley hadley requested a review from lionel- September 25, 2022 15:38
stopifnot(is_cluster(cluster))
code <- enexpr(code)
to_rm <- attr(cluster, "cleaner")$reset()


if (!isTRUE(simplify) && !is.null(ptype)) {
Copy link
Member

Choose a reason for hiding this comment

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

Maybe take simplify = NULL and use a different default depending on whether ptype is supplied? If not supplied, defaults to FALSE. If supplied, defaults to TRUE.

Do we want to generally support simplify = NA for consistency with purrr?

Copy link
Member Author

Choose a reason for hiding this comment

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

I think we want to move this interface towards list_simplify() so I'd prefer some warning here.

But you're right that I should I support simplify = NA in order to match the interface exactly.

@hadley hadley merged commit 477a3bf into main Sep 26, 2022
@hadley hadley deleted the cluser-call-simplify branch September 26, 2022 14:33
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.

Deprecated vctrs::vec_cast_list()
2 participants