pegeler / eddington2

Calculating your Eddington Number for Cycling 🚲📈

Home Page:https://eddington.bike

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

R6 Eddington class cannot be saved without data loss.

pegeler opened this issue · comments

The hash map of ride history is just a pointer (Rcpp::XPtr) to a std::unordered_map. So if a user attempts to save the Eddington class using save() or saveRDS(), they will be disappointed when reloading data since the pointer will be nil and the data will be lost.

This means that in current-state, several functions will not work as intended when attempting to manipulate the same object between sessions. Some will error silently (like the update() method) and others will raise an error (like attempting to access the H active field).