tbates / umx

Making Structural Equation Modeling (SEM) in R quick & powerful
https://tbates.github.io/
44 stars 17 forks source link

Is it possible to make `DiagrammeRsvg` an optional dependency? #234

Closed barracuda156 closed 8 months ago

barracuda156 commented 8 months ago

DiagrammeRsvg depends on V8, which is very heavy dependency to build and also broken for some platforms.

tbates commented 8 months ago

Hi @barracuda156 Wasn't aware: diagramR has worked reliably for several years for me. But I will look into it. Svg is used to supporting plotting in other formats. It could be optional as most people don't know they can even do this :-(

My only hesitancy is to minimize cases where users install umx, but then something fails because they don't have a recommended package and they get confused (very few users read errors well enough to diagnose what they need to do when something goes wrong like that)

My friendly LLM tells me to use Enhances in DESCRIPTION so will do that in the first instance. Thanks for your clear message and for your interest in umx! T

barracuda156 commented 8 months ago

@tbates Thank you very much!

P. S. Wonder why it needs V8 just for svg rendering. librsvg, at least up to relatively recent versions, worked on C (sadly, current one requires Rust, which is as painful to depend on as V8.)

barracuda156 commented 7 months ago

Awesome, everything works now, tests pass:

* using log directory ‘/opt/local/var/macports/build/_opt_PPCSnowLeopardPorts_R_R-umx/R-umx/work/umx/umx.Rcheck’
* using R version 4.3.2 (2023-10-31)
* using platform: powerpc-apple-darwin10.0.0d2 (32-bit)
* R was compiled by
    gcc-mp-13 (MacPorts gcc13 13.2.0_3) 13.2.0
    GNU Fortran (MacPorts gcc12 12.3.0_0) 12.3.0
* running under: OS X Snow Leopard 10.6
* using session charset: UTF-8
* using option ‘--ignore-vignettes’
* checking for file ‘umx/DESCRIPTION’ ... OK
* this is package ‘umx’ version ‘4.19.0’
* package encoding: UTF-8
* checking package namespace information ... OK
* checking package dependencies ... NOTE
Package which this enhances but not available for checking: ‘DiagrammeRsvg’
* checking if this is a source package ... OK
* checking if there is a namespace ... OK
* checking for executable files ... OK
* checking for hidden files and directories ... OK
* checking for portable file names ... OK
* checking for sufficient/correct file permissions ... OK
* checking whether package ‘umx’ can be installed ... OK
* checking installed package size ... NOTE
  installed size is  5.9Mb
  sub-directories of 1Mb or more:
    R      1.0Mb
    help   4.4Mb
* checking package directory ... OK
* checking DESCRIPTION meta-information ... OK
* checking top-level files ... OK
* checking for left-over files ... OK
* checking index information ... OK
* checking package subdirectories ... OK
* checking R files for non-ASCII characters ... OK
* checking R files for syntax errors ... OK
* checking whether the package can be loaded ... OK
* checking whether the package can be loaded with stated dependencies ... OK
* checking whether the package can be unloaded cleanly ... OK
* checking whether the namespace can be loaded with stated dependencies ... OK
* checking whether the namespace can be unloaded cleanly ... OK
* checking loading without being on the library search path ... OK
* checking startup messages can be suppressed ... OK
* checking dependencies in R code ... NOTE
Namespaces in Imports field not imported from:
  ‘foreign’ ‘psychTools’ ‘pwr’ ‘rmarkdown’
  All declared Imports should be used.
* checking S3 generic/method consistency ... OK
* checking replacement functions ... OK
* checking foreign function calls ... OK
* checking R code for possible problems ... OK
* checking Rd files ... OK
* checking Rd metadata ... OK
* checking Rd cross-references ... OK
* checking for missing documentation entries ... OK
* checking for code/documentation mismatches ... OK
* checking Rd \usage sections ... OK
* checking Rd contents ... OK
* checking for unstated dependencies in examples ... OK
* checking contents of ‘data’ directory ... OK
* checking data for non-ASCII characters ... OK
* checking LazyData ... OK
* checking data for ASCII and uncompressed saves ... OK
* checking examples ... OK
* checking for unstated dependencies in ‘tests’ ... OK
* checking tests ...
  Running ‘testthat.R’
 OK
* checking PDF version of manual ... OK
* DONE

Status: 3 NOTEs