nevrome / wellspell.addin

R Package - Quick Spellcheck Addin for RStudio
MIT License
21 stars 3 forks source link

Why core dependencies are in "Suggests" and not in "Imports"? #9

Closed GegznaV closed 5 years ago

GegznaV commented 5 years ago

In DESCRIPTION file, packages hunspell and LanguageToolR arein section "Suggests":

Suggests:
  hunspell,
  LanguageToolR (>= 0.1.2)

These packages give core functionality for the add-in and dependencies in "Suggests" are not always downloaded. Shouldn't these packages be moved to "Imports" (or even "Depends")?

nevrome commented 5 years ago

That's on purpose to make it possible to use the package without either hunspell or LanguageTool.

This code informs the user in case of a missing package:

https://github.com/nevrome/wellspell.addin/blob/501b472ac55a8aede5c2db97389edaca85f1ca5f/R/wellspell.R#L14

https://github.com/nevrome/wellspell.addin/blob/501b472ac55a8aede5c2db97389edaca85f1ca5f/R/wellspell.R#L61