Skip to content

[BUG] grayskull cran cannot resolve requirements for an R/CRAN recipe #616

@jdblischak

Description

@jdblischak

Describe the bug

grayskull cran makes multiple mistakes when configuring the recipe requirements for an R package on CRAN:

  • The names are not lowercase (eg the conda package is r-rcpp not r-Rcpp)
  • Packages listed in Depends are ignored
  • Packaged listed in LinkingTo are ignored
  • Packages included with r-base are listed (these packages do not exist on anaconda.org), eg r-stats, r-tools, r-utils, etc.

To Reproduce

I discovered the problems above when generating a recipe for the R package SeuratObject:

curl https://cran.r-project.org/web/packages/SeuratObject/DESCRIPTION
## Depends: R (>= 4.1.0), sp (>= 1.5.0)
## Imports: future, future.apply, generics, grDevices, grid, lifecycle,
##         Matrix (>= 1.6.4), methods, progressr, Rcpp (>= 1.0.5), rlang
##         (>= 0.4.7), spam, stats, tools, utils
## Suggests: BPCells, DelayedArray, fs (>= 1.5.2), ggplot2, HDF5Array,
##         rmarkdown, sf (>= 1.0.0), testthat
## LinkingTo: Rcpp, RcppEigen

grayskull --version
## 2.9.1
grayskull cran --strict-conda-forge r-seuratobject
## host:
##   - r-Matrix >=1.6.4
##   - r-Rcpp >=1.0.5
##   - r-base
##   - r-future
##   - r-future.apply
##   - r-generics
##   - r-grDevices
##   - r-grid
##   - r-lifecycle
##   - r-methods
##   - r-progressr
##   - r-rlang >=0.4.7
##   - r-spam
##   - r-stats
##   - r-tools
##   - r-utils
rm -r r-seuratobject/

conda build --version
## conda-build 25.4.2
conda skeleton cran --use-noarch-generic --add-cross-r-base --no-comments --allow-archived r-seuratobject
## host:
##   - r-base
##   - r-matrix >=1.6.4
##   - r-rcpp >=1.0.5
##   - r-rcppeigen
##   - r-future
##   - r-future.apply
##   - r-generics
##   - r-lifecycle
##   - r-progressr
##   - r-rlang >=0.4.7
##   - r-sp >=1.5.0
##   - r-spam

Expected behavior

Should return the same requirements as conda skeleton cran

Environment:

Versions of grayskull and conda-build included above

Additional context

xref: #615, bgruening/conda_r_skeleton_helper#58, bgruening/conda_r_skeleton_helper#68

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions