epiverse-trace / epimodelac

Training materials for the epimodelac workshop
https://epiverse-trace.github.io/epimodelac/
Other
8 stars 4 forks source link

failed action due to matrixStats #8

Closed avallecam closed 12 months ago

avallecam commented 1 year ago

After solving #7 by removing sandpaper and pegboard from renv.lock we got this new failed action (follow the link to the error message)

The error line is the following (reference)

  - Installing matrixStats ...                    FAILED
avallecam commented 1 year ago

I think matrixStats needs to be updated to a more modern version in renv.lock as well. That version is so old that it's not compatible with our compiler.

Originally posted by @Bisaloo in https://github.com/Joskerus/Nuevoformato/pull/6#issuecomment-1830789692

avallecam commented 1 year ago

Thank you, Hugo.

Yes, indeed. It was due to the version included in the renv.lock. Yesterday we identified that {MatrixStats} was part of {EpiEstim} dependency tree (within {coarseDataTools}).

We solved it in d07d351 and 421eda6 by replacing the renv.lock with the one I generated in the workbench-spanish repo.

I replaced the explicit installation from r-universe to CRAN with sandpaper::pin_version(), removing the explicit reference to all the dependency tree in the renv.lock file, leaving to the GitHub action to install them, see this commit avallecam/workbench-spanish@8408159

Then I tried the same for {rstan} which also generated a similar error in previous workflows, so added a pin_version of it too in a later commit, and it worked fine.

This solution is still under observation.

Originally posted by @avallecam in https://github.com/Joskerus/Nuevoformato/pull/6#issuecomment-1831668112

avallecam commented 1 year ago

When using sandpaper::pin_version() to add the CRAN-specific additions to renv.lock, I used the renv::record() notation as suggested in pin_version and as in these lines of code:

record <- list(
  Package = "EpiEstim", 
  Version = "2.2-4", 
  Source = "Repository", 
  Repository = "CRAN"
)
sandpaper::pin_version(list(EpiEstim = record))
record <- list(
  Package = "rstan", 
  Version = "2.32.3", 
  Source = "Repository", 
  Repository = "CRAN"
)
sandpaper::pin_version(list(rstan = record))

This is still a limited solution, but a useful patch for the moment.