rhub::check_for_cran() cannot find version of vctrs (0.3.0) that dplyr (1.0.0) requires

I am developing a package (http://github.com/flyaflya/causact) that I want to launch on CRAN. As part of the checklist for launch, I run rhub::check_for_cran()

It fails with the following error:

Error in loadNamespace(i, c(lib.loc, .libPaths()), versionCheck = vI[[i]]) :
namespace 'vctrs' 0.2.4 is being loaded, but >= 0.3.0 is required

I do not import vctrs, but I do import dplyr which requires vctrs (>=0.3.0).

Any suggestions to get around this error? I feel like it is a bug somewhere in the chain, but not sure which package to log it with. I do notice on CRAN for vctrs, it says:

Windows binaries: r-devel: vctrs_0.2.4.zip, r-release: vctrs_0.3.0.zip, r-oldrel: vctrs_0.3.0.zip

where the r-devel is the older version (i.e. 0.2.4). might that be causing the issue?

Thanks for any guidance.

1 Like

As soon as I hit enter, I think I may have discovered the issue.

In DESCRIPTION, I was requiring dplyr (>= 0.7.4) ... maybe I should require dplyr (>= 1.0.0). I will keep you posted if this works.

The above was not the fix. I am thinking the issue is with the Windows binaries on CRAN for r-devel are stuck at vctrs 0.2.4 and not upgraded to 0.3.0.

Can anyone confirm this suspicion and recommend who to contact to fix it?

Do you mean you get the error from rhub before your package even gets sent to the R-hub package builder?

No. The R-hub package builder returns this error as part of its output in the 00install.out file. Here is the complete contents of that file:

  • installing source package 'causact' ...
    ** using staged installation
    ** R
    ** data
    *** moving datasets to lazyload DB
    ** byte-compile and prepare package for lazy loading
    Error in loadNamespace(i, c(lib.loc, .libPaths()), versionCheck = vI[[i]]) :
    namespace 'vctrs' 0.2.4 is being loaded, but >= 0.3.0 is required
    Calls: ... namespaceImport -> loadNamespace -> namespaceImport -> loadNamespace
    Execution halted
    ERROR: lazy loading failed for package 'causact'
  • removing 'C:/Users/USERBNOsJcrIKQ/R/causact'

On all three platforms, i.e. in all three logs?

This is an issue with install.packages I believe, it cannot install a mix of binary and source packages properly. See this issue for a workaround: https://github.com/r-hub/rhub/issues/367

1 Like

Thanks. That guidance worked perfect. I just ran the following instead:

rhub::check(
  platform="windows-x86_64-devel",
  env_vars=c(R_COMPILE_AND_INSTALL_PACKAGES = "always")
)
1 Like

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