Repository navigation
Address devtools revdep check failures in upcoming dev release - #399
Conversation
|
I wasn't able to track down why this was failing, but by iteratively working through various tests I was able to at least narrow it down to which code was causing the failure. Turns out it was just the use of Looking more holistically over the package, our use of That said, I'd really appreciate if some other folks could test this against the development build of |
|
devtools' NEWS on devel reports this change:
|
I hadn't seen this, but I'm not sure why it would have an effect. The package fixture's only dependency is Not seeing any changes in the diff since last release that I would expect to crash subprocesses. |
llrs-roche
left a comment
There was a problem hiding this comment.
Related to devtools I only see one relevant change from devtools::install() to install.packages(). I think this will be enough to avoid issues and locally I couldn't detect any issue with devtools 2.5.0.
I left some comments about minor simplifications of the code too.
While testing I realized that webmockr is not used conditionally as the check failed with an error:
Error in `source_dir()`:
! Failed to evaluate './setup_mock_web_requests.R'.
Caused by error in `library()`:
! there is no package called 'webmockr'
I would check other packages on Suggests that they are properly used only when the package is available.
I also got a note (with R 4.5.3) about the documentation:
❯ checking Rd files ... NOTE
checkRd: (-1) pkg_ref.Rd:74-75: Lost braces in \itemize; meant \describe ?
checkRd: (-1) pkg_ref.Rd:77: Lost braces in \itemize; meant \describe ?
checkRd: (-1) pkg_ref.Rd:78-80: Lost braces in \itemize; meant \describe ?
checkRd: (-1) pkg_ref.Rd:81-82: Lost braces in \itemize; meant \describe ?
checkRd: (-1) pkg_ref.Rd:84-85: Lost braces in \itemize; meant \describe ?
checkRd: (-1) pkg_ref.Rd:86-87: Lost braces in \itemize; meant \describe ?
checkRd: (-1) pkg_ref.Rd:88-89: Lost braces in \itemize; meant \describe ?
| on.exit(file.remove(pkg_archive)) | ||
| install.packages(pkg_archive, type = "source", repos = NULL, quiet = TRUE) |
There was a problem hiding this comment.
I'm not sure how does on.exit() play with withr
| on.exit(file.remove(pkg_archive)) | |
| install.packages(pkg_archive, type = "source", repos = NULL, quiet = TRUE) | |
| on.exit(file.remove(pkg_archive), add = TRUE) | |
| install.packages(pkg_archive, type = "source", repos = NULL, quiet = TRUE) |
If the installation of the package fails, is there a way to capture and exit early the test? Just to cover all bases. I don't think it fail, but installing packages while testing might be a bit problematic
| pkg_ref_source_good <- pkg_source(file.path( | ||
| test_path(), | ||
| "test_packages", | ||
| "pkgsourcegood" | ||
| )) |
There was a problem hiding this comment.
Now that the path is out of the built procedure it can be reused:
| pkg_ref_source_good <- pkg_source(file.path( | |
| test_path(), | |
| "test_packages", | |
| "pkgsourcegood" | |
| )) | |
| pkg_ref_source_good <- pkg_source(pkg_path) |
This is a bit tricky in this situation because it's used in setup code. The tests would still run even if we skipped the setup code when I agree that it would be better to add a
Good call, I'll fix these before the release. Otherwise, both of the suggestions look good to me. I think |
For now just drafting changes, will log findings here