daff
daff copied to clipboard
data_diff objects fail on round trip to Rdata files
I found the following behavior surprising:
library(daff)
example(diff_data) # creates the "dd" patch
save(dd, file = "patch_loading.Rdata")
load("patch_loading.Rdata")
dd
## Error in context_eval(join(src), private$context) :
## Context has been disposed.
Almost all R objects can be safely written to Rdata or RDS files. Is this failure expected behavior?
If this is intended, I can contribute a documentation patch to diff_data
and write_diff
so people at least know to expect this -- it caught me off guard since R objects are usually self-contained and Rdata/RDS files are a big part of my workflow.
Thanks for reporting! It should definitely be in the documentation: I will try to fix it, but I'm not sure if it is possible without some major work.