edwindj / daff

Diff, patch and merge for data.frames, see http://paulfitz.github.io/daff/
https://edwindj.github.io/daff/
Other
153 stars 18 forks source link

diff_data() Broken on R v4.4.0 #38

Closed rsh52 closed 5 months ago

rsh52 commented 6 months ago

Our team recently had to update all of our R versions to 4.4.0+ to deal with the recent security risk. Ever since the update, diff_data() seems to fail no matter what version of daff I use. Example below:

library(daff)

mtcars2 <- mtcars[1:31,]

diff_data(mtcars, mtcars2)

Error: ReferenceError: _ is not defined In addition: Warning message: In file(con, "r") : file("") only supports open = "w+" and open = "w+b": using the former

The function seems to be failing here at TableView():

https://github.com/edwindj/daff/blob/cdc95d828dae03f10b7decc487ea05a88668a375/R/diff-data.R#L114

Session Info

Click me ``` > sessionInfo() R version 4.4.0 (2024-04-24) Platform: x86_64-apple-darwin20 Running under: macOS Ventura 13.6.6 Matrix products: default BLAS: /System/Library/Frameworks/Accelerate.framework/Versions/A/Frameworks/vecLib.framework/Versions/A/libBLAS.dylib LAPACK: /Library/Frameworks/R.framework/Versions/4.4-x86_64/Resources/lib/libRlapack.dylib; LAPACK version 3.12.0 locale: [1] en_US.UTF-8/en_US.UTF-8/en_US.UTF-8/C/en_US.UTF-8/en_US.UTF-8 time zone: America/New_York tzcode source: internal attached base packages: [1] stats graphics grDevices datasets utils methods base other attached packages: [1] cli_3.6.2 jsonlite_1.8.8 logger_0.3.0 lubridate_1.9.3 RJDBC_0.2-10 DBI_1.2.2 [7] glue_1.7.0 daff_1.1.1 pins_1.3.0 kableExtra_1.4.0 blastula_0.3.3 dplyr_1.1.4 [13] cgtr_0.1.10.9000 rJava_1.0-11 loaded via a namespace (and not attached): [1] tidyselect_1.2.1 viridisLite_0.4.2 fastmap_1.1.1 promises_1.3.0 digest_0.6.35 [6] timechange_0.3.0 mime_0.12 lifecycle_1.0.4 REDCapR_1.1.0 ellipsis_0.3.2 [11] connectapi_0.1.3.1 magrittr_2.0.3 compiler_4.4.0 rlang_1.1.3 sass_0.4.9 [16] tools_4.4.0 utf8_1.2.4 yaml_2.3.8 knitr_1.46 askpass_1.2.0 [21] emo_0.0.0.9000 htmlwidgets_1.6.4 bit_4.0.5 pkgbuild_1.4.4 curl_5.2.1 [26] xml2_1.3.6 pkgload_1.3.4 rsconnect_1.2.2 miniUI_0.1.1.1 withr_3.0.0 [31] purrr_1.0.2 fansi_1.0.6 urlchecker_1.0.1 profvis_0.3.8 xtable_1.8-4 [36] colorspace_2.1-0 scales_1.3.0 rmarkdown_2.26 crayon_1.5.2 generics_0.1.3 [41] remotes_2.5.0 rstudioapi_0.16.0 PKI_0.1-12 httr_1.4.7 tzdb_0.4.0 [46] sessioninfo_1.2.2 cachem_1.0.8 stringr_1.5.1 parallel_4.4.0 assertthat_0.2.1 [51] base64enc_0.1-3 vctrs_0.6.5 devtools_2.4.5 V8_4.4.2 hms_1.1.3 [56] bit64_4.0.5 systemfonts_1.0.6 tidyr_1.3.1 jquerylib_0.1.4 stringi_1.8.3 [61] later_1.3.2 munsell_0.5.1 tibble_3.2.1 pillar_1.9.0 rappdirs_0.3.3 [66] htmltools_0.5.8.1 openssl_2.1.2 praise_1.0.0 R6_2.5.1 vroom_1.6.5 [71] evaluate_0.23 shiny_1.8.1.1 readr_2.1.5 backports_1.4.1 memoise_2.0.1 [76] renv_1.0.7 httpuv_1.6.15 bslib_0.7.0 Rcpp_1.0.12 uuid_1.2-0 [81] checkmate_2.3.1 svglite_2.1.3 xfun_0.43 fs_1.6.4 usethis_2.2.3 [86] pkgconfig_2.0.3 ```
joelnitta commented 5 months ago

Also running R 4.4.0, but I can't reproduce this:

library(daff)
mtcars2 <- mtcars[1:31,]
diff_data(mtcars, mtcars2)
#> Daff Comparison: 'mtcars' vs. 'mtcars2' 
#>     mpg  cyl disp hp  drat wt   qsec vs  ...
#> ... ...  ... ...  ... ...  ...  ...  ... ...
#>     15   8   301  335 3.54 3.57 14.6 0   ...
#> --- 21.4 4   121  109 4.11 2.78 18.6 1   ...

Created on 2024-06-13 with reprex v2.1.0

Session info ``` r sessioninfo::session_info() #> ─ Session info ─────────────────────────────────────────────────────────────── #> setting value #> version R version 4.4.0 (2024-04-24) #> os macOS Sonoma 14.4.1 #> system aarch64, darwin20 #> ui X11 #> language (EN) #> collate en_US.UTF-8 #> ctype UTF-8 #> tz Asia/Tokyo #> date 2024-06-13 #> pandoc 3.1.2 @ /usr/local/bin/ (via rmarkdown) #> #> ─ Packages ─────────────────────────────────────────────────────────────────── #> package * version date (UTC) lib source #> cli 3.6.2 2023-12-11 [1] CRAN (R 4.4.0) #> curl 5.2.1 2024-03-01 [1] CRAN (R 4.4.0) #> daff * 1.1.1 2024-02-15 [1] CRAN (R 4.4.0) #> digest 0.6.35 2024-03-11 [1] CRAN (R 4.4.0) #> evaluate 0.23 2023-11-01 [1] CRAN (R 4.4.0) #> fastmap 1.2.0 2024-05-15 [1] CRAN (R 4.4.0) #> fs 1.6.4 2024-04-25 [1] CRAN (R 4.4.0) #> glue 1.7.0 2024-01-09 [1] CRAN (R 4.4.0) #> htmltools 0.5.8.1 2024-04-04 [1] CRAN (R 4.4.0) #> jsonlite 1.8.8 2023-12-04 [1] CRAN (R 4.4.0) #> knitr 1.47 2024-05-29 [1] CRAN (R 4.4.0) #> lifecycle 1.0.4 2023-11-07 [1] CRAN (R 4.4.0) #> magrittr 2.0.3 2022-03-30 [1] CRAN (R 4.4.0) #> purrr 1.0.2 2023-08-10 [1] CRAN (R 4.4.0) #> R.cache 0.16.0 2022-07-21 [1] CRAN (R 4.4.0) #> R.methodsS3 1.8.2 2022-06-13 [1] CRAN (R 4.4.0) #> R.oo 1.26.0 2024-01-24 [1] CRAN (R 4.4.0) #> R.utils 2.12.3 2023-11-18 [1] CRAN (R 4.4.0) #> Rcpp 1.0.12 2024-01-09 [1] CRAN (R 4.4.0) #> reprex 2.1.0 2024-01-11 [1] CRAN (R 4.4.0) #> rlang 1.1.4 2024-06-04 [1] CRAN (R 4.4.0) #> rmarkdown 2.27 2024-05-17 [1] CRAN (R 4.4.0) #> sessioninfo 1.2.2 2021-12-06 [1] CRAN (R 4.4.0) #> styler 1.10.3 2024-04-07 [1] CRAN (R 4.4.0) #> V8 4.4.2 2024-02-15 [1] CRAN (R 4.4.0) #> vctrs 0.6.5 2023-12-01 [1] CRAN (R 4.4.0) #> withr 3.0.0 2024-01-16 [1] CRAN (R 4.4.0) #> xfun 0.44 2024-05-15 [1] CRAN (R 4.4.0) #> yaml 2.3.8 2023-12-11 [1] CRAN (R 4.4.0) #> #> [1] /Library/Frameworks/R.framework/Versions/4.4-arm64/Resources/library #> #> ────────────────────────────────────────────────────────────────────────────── ```
rsh52 commented 5 months ago

@joelnitta Thank you for testing! I took another stab at it today and now things are working. Unsure what the problem was before.

Will close.