ncss-tech / soilReports

An R package that assists with the setup and operation of a collection of soil data summary, comparison, and evaluation reports. These reports are primarily used by USDA-NRCS soil scientists in both initial and update mapping.
15 stars 5 forks source link

Dependency resolution problems #116

Open brownag opened 1 year ago

brownag commented 1 year ago

Simply checking that a package name is present in local library is not always enough to load the namespace.

Updating only "missing" packages can possibly result in complicated situations where all packages are present but cannot be loaded due to specific minimum versions set.

Most recently I saw this pop up on a users computer where raster namespace gets loaded via clhs, with raster now requiring terra >1.6-41... and the user had 1.6-17. Sometimes the dependencies are several steps removed and hard for users to figure out.

brownag commented 1 year ago

I just got burned by this today in the stat class--forgot to set update=FALSE for my demonstration.

We might want to develop a way to "pin" specific package versions within the manifests of report as part of the second TODO here. As we probably realized way back when, the default of upgrade=TRUE may be too sensitive to inconsequential version bumps... so the default could be "update if less than minimum required". Will think on this a bit to see if there is a more elegant way than entirely reinventing the current handling of this in DESCRIPTION files...