While debugging a shiny app, I noticed that the same source code produces slightly different sessionInfo()
locally (macOS Catalina 10.15.6) and on the server (Ubuntu 18.04.5 LTS) in terms of packages loaded.
I removed all content from the app, leaving only the loading of the packages:
packages <- c("shiny", "shinythemes", "shinycssloaders", "tidyverse",
"ggthemes", "scales", "feather", "sf", "leaflet", "leaflet.extras",
"RColorBrewer")
lapply(packages, require, character.only = TRUE)
Then printed sessionInfo()
both locally and on the server. While both machines share the same source code and the versions of both R and all packages, the results of sessionInfo()
differ.
On a close look (outputs below), you might notice that the list of "packages loaded via a namespace (and not attached)" are different in that the server does not load:
- sourcetools_0.1.7
- farver_2.0.3
- yaml_2.2.1
- plus, on the server, it loads hms_0.5.3 before crosstalk_1.0.1 (unlike the local machine)
Not sure it would be easy for these differences to create an issue as to access an object from "loaded but not attached" packages one has to prefix with them with packagename::
.
Nonetheless, I was surprised to see the disparities and wonder what might cause such behaviour and if this is normal.
If I load the minimum amount of packages, Shiny only, there are the following differences:
- server lists xtable followed by jsonlite, while locally the other way around;
- server lists yaml and rsconnect, while locally it does not.