ryapric / loggit

Modern Logging for the R Ecosystem
Other
37 stars 2 forks source link

Remove dplyr and jsonlite as dependencies #8

Closed ryapric closed 4 years ago

ryapric commented 4 years ago

I've grown to be wary of external dependencies, both in terms of potential breakage but also in terms of install time/size. A user who just wants to log their script/package entries shouldn't need to spend 20 minutes compiling C/C++ packages (on a Linux deployment host) just to enable that feature. loggit is currently using dplyr only for its bind_rows() functionality, which is easy to replicate in base R. It's leaning heavily into jsonlite though, and that will take some fudging on the read-in-the-data side of things. But writes should be easy to roll my own.

ryapric commented 4 years ago

dplyr is removed, replaced with the internal function bind_rows_loggit(), which appends two data frames regardless of column names/ordering. For more than two at a time, just be sure to run it in a Reduce() call.

ryapric commented 4 years ago

Note: I am aware of the compilation-time improvements in dplyr 1.0.0 (which is AWESOME!), but my point above still stands.

ryapric commented 4 years ago

jsonlite is now removed from Imports as well, replaced by read_ndjson() and write_ndjson() and friends.