Conversation
ESCRI11
requested changes
Jan 12, 2026
Contributor
ESCRI11
left a comment
There was a problem hiding this comment.
Besides the little detail on utils.R, I think the PR looks fine and can be used as a guide for the effort of converting the other functions.
R/utils.R
Outdated
| if (!any(permitted_classes %in% typ)) { | ||
| msg <- glue( | ||
| "The server-side object must be of type {glue_collapse(permitted_classes, sep = ' or ')}. ", | ||
| "'{obj_name}' is type {typ}." |
Contributor
There was a problem hiding this comment.
Sometimes objects have multiple classes, which might create multiple error messages.
> a <- tibble::tibble("1")
> class(a)
[1] "tbl_df" "tbl" "data.frame"
> typ <- class(a)
> glue::glue("hello {typ}")
hello tbl_df
hello tbl
hello data.frame
So I think it would be a good idea to also use glue_collapse to print typ.
Author
There was a problem hiding this comment.
Good spot Xavi! I've amended this, and also used the option to separate strings with more than three words to 'x, x, and x' so the message looks nicer. I've added tests to capture these eventualities.
Author
|
I've also moved the PR template into the .github folder as R check didn't like it in root |
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.
No description provided.