On 7 July 2023 at 00:33, Nilesh Patra wrote: | I think we are hitting this issue here: https://github.com/tidyverse/dplyr/issues/6793 | The comment says "Looks like some package in the stack sets R_forceSymbols(dll, TRUE)" and that package is tibble | | | $ grep -rnw R_forceSymbols | | src/init.c:19: R_forceSymbols(dll, TRUE);
That mechanism should not spill from one package to the next. What we have here is that (R) packages with compiled code can (optionally) declare in NAMESPACE whether or not 'symbols' (ie the entrypoints for the compiled code) should be a registered symbol (to R), or (as they used to be) strings. That is then used in the first argument to .Call() as in eg .Call(myfunc) as opposed to .Call("myfunc"). It has small efficiency gains. Most packages do that now. Now, another (less frequently-used) option is in the intialization file run at package to also say R_forceSymbols in which case the second ("string") form is no longer allowed. Few packages do that. So if tibble does this now, it should only affect tibble itself -- unless of course a dependent package calls directly into the native code of tibble (possible, but rare). So I sum in should not spill. I could be wrong but if there were general spillage it would affect all R use of compiled packages and it very clearly does not. So in short, this force symbol resolution should only affect the symbols from the one shared (per-package) library it is set for. | Since you are building with R from unstable and tibble from testing | (built with an older R), it chokes and works when both are new. Not sure I agree. That should still work. Quick check in Docker (using the r-base image I maintain) shows it does: root@f39da83dba5a:/# dpkg -l r-base-core r-cran-tibble | tail -2 ii r-base-core 4.3.1-2 amd64 GNU R core of statistical computation and graphics system ii r-cran-tibble 3.1.8+dfsg-1 amd64 GNU R Simple Data Frames root@f39da83dba5a:/# Rscript -e 'library(tibble); print(as_tibble(mtcars))' # A tibble: 32 × 11 mpg cyl disp hp drat wt qsec vs am gear carb <dbl> <dbl> <dbl> <dbl> <dbl> <dbl> <dbl> <dbl> <dbl> <dbl> <dbl> 1 21 6 160 110 3.9 2.62 16.5 0 1 4 4 2 21 6 160 110 3.9 2.88 17.0 0 1 4 4 3 22.8 4 108 93 3.85 2.32 18.6 1 1 4 1 4 21.4 6 258 110 3.08 3.22 19.4 1 0 3 1 5 18.7 8 360 175 3.15 3.44 17.0 0 0 3 2 6 18.1 6 225 105 2.76 3.46 20.2 1 0 3 1 7 14.3 8 360 245 3.21 3.57 15.8 0 0 3 4 8 24.4 4 147. 62 3.69 3.19 20 1 0 4 2 9 22.8 4 141. 95 3.92 3.15 22.9 1 0 4 2 10 19.2 6 168. 123 3.92 3.44 18.3 1 0 4 4 # … with 22 more rows root@f39da83dba5a:/# It's simpy that testing has an older one and (esp in the tidyverse) things change quickly and packages want to be in consistent cohort. | This attribute has got something to do with R extensions' entry | points / dll compatibilty, but I simply do not have enough background | with r-core to comment beyond this point, I'm afraid. Hope the above helped a little. Dirk -- dirk.eddelbuettel.com | @eddelbuettel | e...@debian.org