work-in-progress save_rds/read_rds#23
Open
traversc wants to merge 1 commit intoRConsortium:mainfrom
Open
Conversation
sebffischer
reviewed
Mar 16, 2026
| @@ -0,0 +1,235 @@ | |||
| .sakura_state <- new.env(parent = emptyenv()) | |||
| .sakura_serial_fields <- c("class", "package", "sfunc", "ufunc") | |||
| .sakura_state$registry <- list() | |||
There was a problem hiding this comment.
maybe we can use hashtab() for this as I expected this might get large eventually when we are successfull with integrating this into base R.
Collaborator
Author
There was a problem hiding this comment.
Makes sense. I haven't used them before, it looks like it came in with R 4.2 so we may want to switch based on R version.
| #' @param package a character string (or vector) naming the package that should | ||
| #' be loaded before deserializing objects for each class. May be inferred when | ||
| #' `sfunc` and `ufunc` both come from the same package namespace. | ||
| #' @param sfunc a function (or list of functions) that accepts a reference |
There was a problem hiding this comment.
it does not have to be a reference object, this is just our initial use case I guess.
Collaborator
Author
There was a problem hiding this comment.
R only allows hooks on "reference objects" which are extptr and environments. If we want to expand to more types that would require a base R change.
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.