Closed jennybc closed 11 months ago
devtools
is most likely taking a dependency on miniUI
(and therefore shiny
) to avoid a dialog that pops up when running an addin in RStudio if the package isn't installed. The dialog is somewhat aggressive in that it prevents any addins from running if the miniUI
package isn't installed. https://github.com/rstudio/rstudio/issues/12078 argues for the removal of this check, but isn't currently on a roadmap for release in the RStudio IDE.
I think we just need to use the new technique that doesn't immediately load these namespaces.
devtools actually makes use of lifecycle::deprecated()
, so it makes sense to @importFrom
.
OTOH these are expedient @importFrom
s, so we can convert them to use the new technique:
miniUI::miniPage()
profvis::profvis()
urlchecker::url_check()
At the very least, update how we justify
Imports
that have no obvious direct usage within devtools. Determine if some of these@importFrom
s should be updated:https://github.com/r-lib/devtools/blob/9568e51adabfb6f7c6914d9ebc309ce65a7060c9/R/devtools-package.R#L13-L16
to instead use the technique described here:
https://r-pkgs.org/dependencies-in-practice.html#how-to-not-use-a-package-in-imports
This came up after a recent incident that reminded us that merely loading devtools causes shiny to be loaded (via miniUI), during the "package version as character" episode.