-
-
Notifications
You must be signed in to change notification settings - Fork 217
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Preparing for Rcpp 1.0.13 and asking four packages for an adjustment #1311
Comments
Do you want to approach the note regarding |
Release 1.0.13 should only cover what is in the repo right now, the rest will have to wait for 1.0.14. As you say, lots of moving parts still. (We could work on changes in a branch but the next release is so close that I do not plan on anything major or potentially disruptive.) |
Acknowledged, and certainly in favour of the motivation behind these changes. I've downloaded Rcpp 1.0.12.4 and am looking to see what changes I need to make in TreeDist. However, as an inexperienced C++ user, I'm struggling to work out what action I need to take. I can't find any use of the string |
@eddelbuettel I see no issues with |
@ms609 Maybe start with your tests? I see
But it could of course be my end? Maybe @AshesITR I see this at the end of the tests which may be the new out-of-bounds warning?
|
@eddelbuettel This is curious; tests pass for me.
|
@AshesITR Sorry that may be partially my fault. I had prepared 1.0.12.4 and eg pusged it to the rcpp-drat (see eg here in its src/contrib) but had failed to actually commit the DESCRIPTION and ChangeLog change. That said, if you installed from the main branch you would have had the changes. In any event, my bad and let's try to refer to that tarball as 1.0.12.4. It will also be at the r-universe site soon. With it, and on the Debian testing machine with current version of everything I see what is under 'details' below. I see you also have a pending new version incoming at CRAN, so that may need retesting.
|
I did test using 0.0.2 has a bunch of issues regarding length-0 input to the C++ routines, so if you tested that version, it is probably worth testing my current master branch instead. If you want, you could try running this snippet to see if we have a problem in the 0.0.3 version and help me find it # remotes::install_github("AshesITR/reservr")
library(reservr)
set.seed(1337L)
dist <- dist_erlangmix(list(NULL, NULL, NULL))
params <- list(
shapes = list(1L, 4L, 12L),
scale = 2.0,
probs = list(0.5, 0.3, 0.2)
)
alt_params <- list(
shapes = list(2L, 6L, 100L),
scale = 0.1,
probs = list(0.7, 0.2, 0.1)
)
x <- dist$sample(100L, with_params = params)
str(fit(dist, x, init = "shapes", shapes = as.numeric(params$shapes))) |
Of course, if you refer to a newer version than what is released at CRAN we will be talking about likely different outcomes based on different inputs. Reverse dependency checks commonly deploy the (then-current) released version, that is how CRAN tests acceptance. I can and will catch up to reservr 0.0.3 if it makes it to CRAN to assert if it does address the issues I saw with 0.0.2. |
@eddelbuettel I've been able to reproduce your result in a GitHub actions run. |
@ms609 Strange that it covers all platforms. That is a bit of head scratcher -- I don't think I have seen that. Your > db <- tools::CRAN_package_db()
> tools::package_dependencies("TreeDist", recursive=TRUE, db=db)[[1]]
[1] "stats" "ape" "cli" "colorspace" "memoise" "phangorn" "Rdpack"
[8] "shiny" "shinyjs" "TreeTools" "Rcpp" "nlme" "lattice" "graphics"
[15] "methods" "utils" "parallel" "digest" "grDevices" "rlang" "cachem"
[22] "fastmatch" "generics" "igraph" "Matrix" "quadprog" "tools" "rbibutils"
[29] "httpuv" "mime" "jsonlite" "xtable" "fontawesome" "htmltools" "R6"
[36] "sourcetools" "later" "promises" "crayon" "fastmap" "withr" "commonmark"
[43] "glue" "bslib" "lifecycle" "bit64" "PlotTools" "RCurl" "R.cache"
[50] "bit" "base64enc" "jquerylib" "sass" "magrittr" "pkgconfig" "vctrs"
[57] "cpp11" "grid" "R.methodsS3" "R.oo" "R.utils" "bitops" "fs"
[64] "rappdirs"
> One possible approach may be start at the other end with a 'fake' new empty package and add one of the core dependencies at a time to see what happens where. It is alwasy possible that we engineered a binary interface incompatibility here, but I also think that is unlikely as we have not affected some 2800 oother packages. |
thanks @eddelbuettel, found the issue in PKPDsim, and made a fix. |
@AshesITR Nice -- version 0.0.3 now on CRAN tests cleanly. So that one is taken care of as you surmised -- yay!! |
I wanted to give it a try to fix the dependency resolution issue and I hope this helps. I also added a Dockerfile to streamline the setup and testing process. The fGarch package was causing the resolution issue due to its dependency on Matrix (>= 1.5-0), which required a newer version of R. By explicitly installing Matrix and other critical dependencies in the correct order, we can prevent issues related to missing or conflicting dependencies. |
@eddelbuettel I see no issue after installing the GitHub version of Rcpp and checking my current master branch (Version 0.1.2.9000 which contains a bugfix to the released version on CRAN). I will submit to CRAN. Hope this will solve the issue. |
After rebuilding the dependency "TreeTools" (included in the |
@ms609 "Maybe" -- sadly I don't know which of the packages in the long list I may need to rebuild on my box. I will try to take a look (once back from some traveling). |
Thanks – I think you should only need to rebuild TreeTools. The issue seems (I think) to arise where the C++ code uses an Rcpp::XPtr to a TreeTools::ClusterTable object (included using (NB I've been part-way through a project to remove a dependency on one package that contributes heavily to this list of dependencies; this has given me fresh enthusiasm to finish that job!) |
Luckily that is generally not the case (we use a lot of XPtr constructs in some projects) but I can try a rebuild. Could it maybe be something related to an old version of Matrix? I think rebuilt everything that compiles against its headers and see no other 'sudden deaths'. |
I'd be surprised if Matrix was related; it's a dependency of another package (phangorn) that's only tangentially used; I don't think any Matrix-dependent functions are directly or indirectly called by TreeDist. The segmentation faults I'd been seeing occur within a TreeDist C++ function that calls TreeTools::ClusterTable (but no Matrix functions), and disappeared when I re-installed TreeTools and TreeDist. |
Noted. I will give rebuilding it a try when I get a moment (am traveling) and report back. |
@luisgruber Thank you -- the new version passes as expected. Very nice. @ms609 As you suggested, a rebuild of |
@roninsightrx Do you plan to roll a new (minor) release to CRAN? I will probably try to upload a new Rcpp within a week. It is good enough to be able to explain to CRAN that an issue they may see is already taken care of, but it is of course even easier not to have the conversation :) |
This release is now on CRAN, with breakage at So closing the issue. Big thanks again to everybody for the extremely fast and impressive fixes (even if one did not make it to the repo yet). Your cooperation really helps with maintaining the package. |
Rcpp aims at a six-months release cycle with releases in January and July, and has followed this pattern for a few years. The next release 1.0.13 is due next month, and with the ongoing changes in R(-devel) to more formally define the C API of R, we now merged a PR (#1310) prepared by Kevin to avoid the use of
DATAPTR
. (It also 'hardens' out of bounds access a little; the opt-out config variable that always existed is still there should you need it.)The PR was tested diligently via nearly all 2800 reverse dependencies. It lead us to soften one
stop()
to awarning()
. In the last run, four packages exhibited issues that are 'new relative to the CRAN version'. We recognise that we are imposing a small change on others, but we are doing so in the spirit of making R more solid using more well defined interfaces. We will that a change improving use and setup for over 2800 package is worth the small price of asking for a change in just four packages.The packages in question, their relative versions. maintainers and repos are
TreeTools
Maintainers (and of course everybody else) can access a release candidate for the upcoming Rcpp 1.0.13 in the current version from its repo1, the rcpp drat2, or r-universe34.
I plan to follow-up in email too but encourage everybody to follow-up here (or on the rcpp-devel list, if you are subscribed already; else consider subscribing and 'lurking').
So if there are any questions, just ask.
PS As noted below, I prepared 1.0.12.4 and eg shipped to the drat repo but failed to then push here so r-universe was behind in it build. The Rcpp repo will have had the correct code merged but not at the right version. This should now be fine with 1.0.12.4 at sha1 5189611. The key merged was PR #1310 merged at 5614a8b so if you installed from source (eg via
remotes
) or from r-universe) within the last day or so after i opened this issue you will have gotten, it just did not yet call itself 1.0.12.4 as it does now. Sorry for any confusion on that.Footnotes
Use
remotes::install("RcppCore/Rcpp")
from the default branch which will fetch it ↩Use
install.packages(): install.packages("Rcpp", repos=c("https://RcppCore.github.io/drat", "https://cloud.r-project.org"))
and see https://rcppcore.github.io/drat/ for more ↩Use
install.packages('Rcpp', repos = c('https://rcppcore.r-universe.dev', 'https://cloud.r-project.org'))
and see https://rcppcore.r-universe.dev/Rcpp ↩As I type this, r-universe is still at 1.0.12.3 but should catch up to 1.0.12.4 within the hour. ↩
The text was updated successfully, but these errors were encountered: