Summary:
rstanarm imports shinystan, meaning that all packages that import rstanarm (or suggest it and install the suggested packages in CI) also have to install a whole lot of shiny-related packages. This can cause issues in CI and for other package maintainers.
Description:
Hello, I don't use rstanarm but I maintain a package that Suggests it (datawizard). Recently, there were some failures in CI due to installation errors for QuickJSR. I was a bit intrigued because our package has nothing to do with Javascript and doesn't use any shiny-related packages. It turned out that QuickJSR was installed because shinystan is also installed, and that's because we suggest rstanarm:
pak::pkg_deps_explain("datawizard", "QuickJSR", dependencies = TRUE)
#> ℹ Loading metadata database✔ Loading metadata database ... done
#> datawizard -> brms -> rstan -> QuickJSR
#> datawizard -> rstanarm -> rstan -> QuickJSR
#> datawizard -> rstanarm -> shinystan -> rstan -> QuickJSR
(note that QuickJSR is also installed by rstan but this encouraged me to open this issue)
As I said before, I never used rstanarm before but it seems to me that shinystan isn't so important here. From what I can see shinystan is only imported to provide a method for objects of class stanreg. However, this doesn't require importing shinystan, suggesting it would be enough using s3_register() (see in particular the section "Usage in other packages").
I didn't find a trivial way to compute how many mandatory dependencies would be removed if shinystan was moved from Imports to Suggests, but I'd assume this number is quite high given all the dependencies of shiny that would no longer need to be installed.
library(deepdep)
dd <- deepdep("rstanarm", depth = 2)
plot_dependencies(dd)

Is this something you would consider?
Reproducible Steps:
N/A
RStanARM Version:
2.32.1
R Version:
4.4.0
Operating System:
Windows 10 x64 (build 19045)
Summary:
rstanarmimportsshinystan, meaning that all packages that importrstanarm(or suggest it and install the suggested packages in CI) also have to install a whole lot ofshiny-related packages. This can cause issues in CI and for other package maintainers.Description:
Hello, I don't use
rstanarmbut I maintain a package thatSuggestsit (datawizard). Recently, there were some failures in CI due to installation errors forQuickJSR. I was a bit intrigued because our package has nothing to do with Javascript and doesn't use anyshiny-related packages. It turned out thatQuickJSRwas installed becauseshinystanis also installed, and that's because we suggestrstanarm:(note that
QuickJSRis also installed byrstanbut this encouraged me to open this issue)As I said before, I never used
rstanarmbefore but it seems to me thatshinystanisn't so important here. From what I can seeshinystanis only imported to provide a method for objects of classstanreg. However, this doesn't require importingshinystan, suggesting it would be enough usings3_register()(see in particular the section "Usage in other packages").I didn't find a trivial way to compute how many mandatory dependencies would be removed if
shinystanwas moved fromImportstoSuggests, but I'd assume this number is quite high given all the dependencies ofshinythat would no longer need to be installed.Is this something you would consider?
Reproducible Steps:
N/A
RStanARM Version:
2.32.1
R Version:
4.4.0
Operating System:
Windows 10 x64 (build 19045)