ropensci / EML

Ecological Metadata Language interface for R: synthesis and integration of heterogenous data
https://docs.ropensci.org/EML
Other
98 stars 33 forks source link

Use pandoc conditionally #290

Closed cboettig closed 4 years ago

cboettig commented 4 years ago

As per email from CRAN:

As 'Writing R Extensions' says

' A package with a hard-to-satisfy system requirement is by definition not portable, annoyingly so if this is not declared in the ‘SystemRequirements’ field. The most common example is the use of pandoc, which is only available for a very limited range of platforms (and has onerous requirements to install from source) and has capabilities that vary by build but are not documented.

Usage of external commands should always be conditional on a test for existence (perhaps using Sys.which), as well as declared in the ‘SystemRequirements’ field.'

Do ensure that your package is compliant before Dec 17 to safely retain it on CRAN.

cboettig commented 4 years ago

I'll just note that I don't really understand the issue. We only use pandoc through a dependency on rmarkdown (which we already use conditionally). pandoc is a listed dependency of rmarkdown, and is listed in the systemRequirements of the rmarkdown package.

I would not think that a package would need to list the systemRequirements of its dependencies, any more than it needs list the dependencies of it's dependencies. rmarkdown is a CRAN package and appears not to be included on the list of packages receiving this email.

Anyway, I think we can easily add a condition that checks rmarkdown::pandoc_available() here)...

amoeba commented 4 years ago

Odd. The language isn't really clear, do they mean EML depends on pandoc or are they merely giving it as an example? Is it possible that xml2 is another example because it requires libxml-dev? jq is another one. Really, EML depends on librdf0-dev, libv8-dev, libjq-dev, and libudunits2-dev which (maybe?) they're saying reduces portability.

cboettig commented 4 years ago

Operationally, I believe they are referring to https://cran.r-project.org/web/checks/check_results_EML.html, where CRAN has several platforms they test on which lack pandoc (Solaris, though apparently all of the CRAN MacOS test servers also lack pandoc).

Note the rmarkdown package itself uses skip_on_cran() ....

cboettig commented 4 years ago

hopefully fixed in 9bb6e0c3ce24ec853055ec8948c7ba1c7b394674.

Submitted patch to CRAN as v2.0.1 (bumped the NEWS file as well with the recent PRs since 2.0.0 release). 🤞🤞