ouseful-testing / webr-package-repo-demo

Can we build and serve webr packages?
https://ouseful-testing.github.io/webr-package-repo-demo/
0 stars 0 forks source link

Lookup dependencies #2

Open psychemedia opened 1 month ago

psychemedia commented 1 month ago

Several a packages are defined as dependencies in M348 VCE image — M348, nlme, urca, plm, formatR, tseries — and these in turn may have dependencies or imports.

Eg via https://cran-e.com/ we can look up dependencies, imports, suggested/recommended packages etc

Pattern is: (required :: imports :: suggests)

Imports on imports etc:

TO DO — at least: Rcpp

psychemedia commented 1 month ago

Some of the packages latest version are failing because they expect R 4.4. But we can look to CRAN for old legacy versions, download the src and build from it as a local package; eg https://cran.r-project.org/src/contrib/Archive/MASS/ via a possible lookup recipe here: https://forum.posit.co/t/mass-not-available-for-r-4-3-3/188156/3

* deps::_site/src/contrib/MASS_7.3-61.tar.gz: Needs R >= 4.4.0
ERROR: this R is version 4.3.3, package 'MASS' requires R >= 4.4.0

# Not sure how to cope with compilation error? Try an older src package locally?
ERROR: compilation failed for package 'tseries'

make: *** [/opt/R/4.3.3/lib/R/etc/Makeconf:214: aind.o] Error 1
ERROR: compilation failed for package 'quadprog'
psychemedia commented 1 month ago

Ok - so i can build lots of the above (MASS is okay if we downgrade) but still failing on: tseries, quadprog and curl

In trying to load packages, I can't load:

I'm also seeing a fail truying to load parallel. This seems to be an R core package, but maybe it's not available in single thread JupyterLite kernel?

Ah, maybe https://joshuaulrich.r-universe.dev/quantmod for quantmod, the 4.3 emscripten package? Nope.

psychemedia commented 1 month ago

Issue with something breaking and trying to load parallel, which is not in core py in webr.

image

I should maybe have twigged which package might be responsible...

Here's how I tried to track down which package or packages was responsible:

image

The issue looks like it might be in the collapse package:

image

The imported function is guarded against by a check on a parallel= argument with default F so a quick hack might just be to comment out that line and rebuild the package locally?