renv erroneously thinks private package is from Bioconductor, blocking deployment to Posit Connect

I have a private package that I'll call "privatePackage" below, used in some notebooks that I want to deploy to Posit Connect. I manage all the dependencies for these notebooks via renv, and so I've placed the private package in an RStudio Package manager at "fakeRSPMHostname" and installed the private source package into renv via


However, renv seems to think that the package came from Bioconductor, because in renv.lock I see:

    "privatePackage": {
      "Package": "privatePackage",
      "Version": "<obfuscated>",
      "Source": "Bioconductor",
      "Repository": "RSPM",

This persists after removing the package from the project, renv::purge-ing it, and installing it again. I can't think of any reason it would flag this as a Bioconductor package; the only thing I can think of is that the RSPM does have a Bioconductor mirror.

Well, I made two changes but still get this problem (repeating all the steps from a clean slate with the package removed from the projected and renv::purge-d): I removed the bioconductor mirror from the RSPM installation, and I replaced the repos argument with a named list as it should be.

It's possible I mis-identified the problem. After setting my RSPM repo as one of option("repos") by appending to the .Rprofile generated by renv, I can now deploy to Posit Connect successfully. It's still the case, however, that renv.lock claims privatePackage is from Bioconductor, but now it's apparently just an innocuous warning (and maybe I was mistaking it for the root error before).

It seems that you are encountering an issue where renv incorrectly identifies your private package as coming from Bioconductor when you install it from your RStudio Package Manager (RSPM) repository. This behavior can be confusing, but it might be due to the way renv is configured or how the package is structured in your RSPM repository.

Here are some steps you can take to troubleshoot and potentially resolve this issue:

  1. Check Package Structure: Ensure that the structure of your private package in your RSPM repository is correct. It should follow the standard package structure for R packages. This includes having the necessary DESCRIPTION file with metadata about the package.
  2. Check renv Configuration: Review your renv configuration to ensure it is correctly set up to use the RSPM repository. You can use the following command to check your current repository settings:

RCopy code


Make sure that the repos setting points to your RSPM repository URL.
3. Explicitly Specify Repository: When you install your private package using renv::install(), you can explicitly specify the repository to use. Try specifying your RSPM repository like this:

RCopy code

renv::install("privatePackage", repos = "https://fakeRSPMHostname:4242/repo-name/latest")

Explicitly specifying the repository may help renv recognize the package source correctly.
4. Check for Bioconductor References: Review the DESCRIPTION file of your private package for any references to Bioconductor. Ensure that there are no Bioconductor-related metadata in the DESCRIPTION file.
5. Check RSPM Configuration: Review your RStudio Package Manager configuration to ensure that it is not inadvertently connecting to a Bioconductor mirror. Verify that your RSPM is set up correctly to host and serve your private packages.
6. Clear renv Cache: You can try clearing the renv cache to ensure that it doesn't retain any outdated information:

RCopy code

  1. Contact RSPM Support: If the issue persists, consider reaching out to RSPM support or consulting their documentation for guidance on configuring private package repositories correctly.

By following these steps, you should be able to troubleshoot and resolve the issue of renv incorrectly identifying your private package as coming from Bioconductor.

1 Like