Posit PackageManager - too many RODBC's?

I'm trying to use https://packagemanager.posit.co as a CRAN source

I'm having trouble installing new versions of RODBC - because there seems to be >1 package with the same name

ie. looking at https://packagemanager.posit.co/client/#/repos/cran/packages/RODBC/111781/overview?search=rodbc#package-details there are two RODBC instances:

How do I tell renv to use the second one? Is there anything that can be done to unify the two? Or maybe to get rid of https://packagemanager.posit.co/client/#/repos/cran/packages/RODBC/111781/overview?search=rodbc#package-details altogether as it looks rogue?

Hi @slodge, there are actually two current versions of RODBC on CRAN right now, one older and one newer. Package Manager just doesn't distinguish between them well in the UI, and we're aware of this and hope to fix it in an upcoming release.

Usually CRAN does this when there's a new version of some important package that drops support for older versions of R. I assume it's the same here, as RODBC 1.3-21 now depends on R >= 4.0, while they've kept the older 1.3-16 version under an /Older path to maintain support for R 3.x.

As for the renv issue, I'm not exactly sure about that, but this dual current package issue has caused issues with other package installation tools in the past, like pak with XML a while back, specifically on Package Manager.

Can you post more details about the renv issue? How you're installing RODBC, an installation log, your R version, etc?

1 Like

Thanks for the reply and the investigation....

Our setup is a bit confusing as I'm in the middle of updating 50+ repos from R4.2 to R4.3, plus trying to update them all to renv to 1.0.2 at the same time. I'm starting on Windows - but then our CI server is an Ubuntu docker container...

I've reset our environment and done some digging...

The CRAN setup in renv:

  "R": {
    "Version": "4.3.0",
    "Repositories": [
      {
        "Name": "CRAN",
        "URL": "https://packagemanager.posit.co/cran/latest"
      }
    ]
  }

The RODBC entry that was failing is:

    "RODBC": {
      "Package": "RODBC",
      "Version": "1.3-19",
      "Source": "Repository",
      "Repository": "CRAN",
      "Requirements": [],
      "Hash": "0828c72369b683873ecbaaeb4fcc0aec"
    }

The error message on renv::restore() is...

... argh - now there's no error message... it succeeds!

(That's good news I guess?)

The message earlier was a persistent "version not available on https://packagemanager.posit.co/..."

This might be because I've upgraded renv now... I'm going to have to dig some more to repro it again...

Still testing here... and everything seems to be working...

Not entirely sure what's changed (as I've gone back to git commit that failed earlier)

I had loaded renv 1.0.2, CRAN was set to https://packagemanager.posit.co/cran/latest, current RODBC version was "1.3-19" and the error message was missing/404 when downloading from CRAN

I'm really sorry I don't have the log from these earlier sessions... By this point in my career I really should have learned this lesson.

I'm signing off for the evening now... will take another look in the fresh light of day tomorrow...

For now, please don't look any further (although if you do have any idea what might have caused this...)

@slodge No worries, glad it's resolved now for whatever reason, and this has still been useful feedback. Let us know if you ever figure out what the issue was.

I'm seeing errors again today...

Capturing the details while they happen (but will see if I can solve them myself).

Currently CRAN is

      {
        "Name": "CRAN",
        "URL": "https://packagemanager.posit.co/cran/latest"
      }

and the RODBC entry is:

    "RODBC": {
      "Package": "RODBC",
      "Version": "1.3-19",
      "Source": "Repository",
      "Repository": "CRAN",
      "Hash": "59854b66fa0cb7b0f1771eb60194cdf4",
      "Requirements": []
    },

Trying to run an rsconnect::writeManifest which now calls into renv and seeing:

ℹ Capturing R dependencies with renv
✔ Found 154 dependencies
Error in `createAppManifest()`:
! All packages must be installed from a reproducible location.
✖ Can't re-install packages installed from source: RODBC.
ℹ See `rsconnect::appDependencies()` for more details.
Run `rlang::last_trace()` to see where the error occurred.

Using rsconnect 1.1.0 and renv 0.16.0 ...

So first step will be to try to upgrade renv...

Upgraded... session info now:

 sessionInfo()
R version 4.3.0 (2023-04-21 ucrt)
Platform: x86_64-w64-mingw32/x64 (64-bit)
Running under: Windows 10 x64 (build 19045)

Matrix products: default


locale:
[1] LC_COLLATE=English_United Kingdom.utf8  LC_CTYPE=English_United Kingdom.utf8   
[3] LC_MONETARY=English_United Kingdom.utf8 LC_NUMERIC=C                           
[5] LC_TIME=English_United Kingdom.utf8    

time zone: GB
tzcode source: internal

attached base packages:
[1] stats     graphics  grDevices datasets  utils     methods   base     

loaded via a namespace (and not attached):
 [1] compiler_4.3.0  cli_3.6.1       rsconnect_1.1.0 tools_4.3.0     rstudioapi_0.14 yaml_2.3.5     
 [7] jsonlite_1.8.2  lifecycle_1.0.3 rlang_1.1.1     renv_1.0.3  

Definitely seeing that issue still:

> rsconnect::appDependencies("Report/shiny_app")
...
9               R6   2.5.1      CRAN https://packagemanager.posit.co/cran/latest
10    RColorBrewer   1.1-3      CRAN https://packagemanager.posit.co/cran/latest
11           RODBC  1.3-19      <NA>                                        <NA>
12            Rcpp   1.0.9      CRAN https://packagemanager.posit.co/cran/latest
13         askpass     1.1      CRAN https://packagemanager.posit.co/cran/latest
...

Installing 1.3-21 resolved it...

install.packages("RODBC")

led to:

9               R6   2.5.1      CRAN https://packagemanager.posit.co/cran/latest
10    RColorBrewer   1.1-3      CRAN https://packagemanager.posit.co/cran/latest
11           RODBC  1.3-21      CRAN https://packagemanager.posit.co/cran/latest
12            Rcpp   1.0.9      CRAN https://packagemanager.posit.co/cran/latest
13         askpass     1.1      CRAN https://packagemanager.posit.co/cran/latest

... but at least I know I wasn't going entirely insane when I thought I saw problems last week :slight_smile:

I have dug a little deeper...

The list of availablePackages that is passed to findRepoUrl (and other functions) includes older RODBC and new RODBC in rsconnect/R/bundlePackagePackrat.R at 41907afefe219a5e00496c0ba99746eca38fbf01 · rstudio/rsconnect · GitHub

The first one is the Older one... so that's what the match picks up...

I'll transfer this to the rsconnect issues list.

Moved to Problems when CRAN returns multiple matches for a package · Issue #1002 · rstudio/rsconnect · GitHub