Skip to content

Warn if NAMESPACE incompatible with Imports/Suggests #1075

@krlmlr

Description

@krlmlr

We know which packages are imported from via @import and @importFrom. If we don't import but use :: in the code, it's a "Suggests". Perhaps add a new tag @suggest to make it explicit (and avoid parsing the code)?

We now have the necessary infrastructure (in particular {desc}) so that this should be fairly easy to add?

Opt-in, perhaps run by default and give a message if imports/suggestions are different? Should this go to https://github.com/gaborcsardi/roxygenlabs first?

Gains:

  • Saves frustration when problems only come up with R CMD check.
  • Allows to document the rationale behind each imported/suggested package. AFAIK DESCRIPTION doesn't support comments (only *Note fields).

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions