How should a meta-package handle this note?: 'All declared Imports should be used'

Following the tidyverse, my meta-package imports some packages only for the purpose of installing them. But the meta-package itself does not use those packages, and I run R CMD Check via rhub::check_on_macos() I get the note All declared Imports should be used.

Should I do anything about it?

> rhub::check_on_macos()
─  Building package
─  Uploading package
─  Preparing build, see status at
   http://builder.r-hub.io/status/fgeo_1.1.1.9000.tar.gz-733f6959176a4d6aa0532fdfc3cf0f93

# ... MORE STUFF

N  checking dependencies in R code (927ms)
   Namespaces in Imports field not imported from:
     ‘fgeo.analyze’ ‘fgeo.plot’ ‘fgeo.tool’ ‘fgeo.x’
     All declared Imports should be used.
1 Like

Would https://github.com/mkearney/pkgverse help?

2 Likes

Thanks @maelle,
The answer I was looking for is here:

They are suppressing the note by importing one function from every package, even if that functions is not used.

After that work-around my meta-package passes R CMD check without that note:
https://builder.r-hub.io/status/fgeo_1.1.2.9000.tar.gz-af58d835ab7e4afe90a46ee537bbf903

5 Likes

Good find! :tada: :ok_hand:

This topic was automatically closed 7 days after the last reply. New replies are no longer allowed.

If you have a query related to it or one of the replies, start a new topic and refer back with a link.