Deploying Shiny apps with different shiny package versions

shiny
packrat

#1

At work we run Shiny Server Pro and run Shiny apps as a service account. We deploy applications via BitBucket and packages are managed with packrat. In certain projects, the shiny package version and its dependencies accessible to the service account is different from the ones tracked by the project (e.g., svc accnt uses shiny 1.0.5 vs packrat uses version 1.1.0). When this is the case and we launch the app in SSP, the app errors out because packrat unloads shiny 1.0.5 (but not httpuv 1.3.5, which is loaded via namespace (not attached)) and fails loading shiny 1.1 because it requires httpuv 1.4.3 or higher. I would like to hear suggestions to be able to deploy applications with potentially different shiny versions (and its dependencies). I'm thinking about unloading shiny and its dependencies after sourcing packrat/init.R and before I call library(shiny) in the global.R file, but I'm hoping there's a better solution. Thank you