You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
roxygenize...............................................................Failed
- hook id: roxygenize
- exit code: 1
- The project is out-of-sync -- use `renv::status()` for details.
- The project is out-of-sync -- use `renv::status()` for details.
ℹ Loading dso
Error in `precommit::roxygenize_with_cache()`:
! The package "rstudioapi" (>= 0.11) is required.
Backtrace:
▆
1. └─precommit::roxygenize_with_cache(key = wd, dirs = path_relative_cache)
2. └─rlang::abort(conditionMessage(out)) at repocskrdn2t/R/roxygen2.R:103:5
Execution halted
Expected behavior
All declared dependencies are automatically installed
Additional context
My operating system is: Rocky 9.4
[ ] My project uses {renv}.
[ ] the output of packageVersion('renv')
I was wondering if this is the same as #589, but it #589 already fails on installing the hook, whereas in my case it only fails open executing the hook. I also tried the pre-commit version from the branch you mention in that issue and it didn't help.
The text was updated successfully, but these errors were encountered:
Please check the docs, you need to add the dependencies manually. It seems the roxygen error changed and hence {precommit} does not show you the custom instructions anymore. Will fix this.
If you specify additional roclets through the Roxygen: field in DESCRIPTION, e.g. from {pkgapi} you must specify the dependencies explicitly such that renv::install() understands it, e.g.
rstudioapi is not a dependency of a roclet, but of my package itself. Do I need to repeat all package dependencies in additional_dependencies?
Yes, the docs are not very clear. Because with older versions of {roxygen2}, you should be prompted to add them manually (Räder Tue link to tue below function is missing). There is a helper function to generate the text to insert: https://lorenzwalthert.github.io/precommit/reference/snippet_generate.html
maybe this was displayed to you upon use_precommit()?
Before filing a bug
remotes::install_github('lorenzwalthert/precommit')
precommit::autoupdate()
)Describe the bug
I have a package that depends on
rstudioapi
and declares so in its DESCRIPTIONThe package uses the
roxygenize
hook:When running
it fails with
Expected behavior
All declared dependencies are automatically installed
Additional context
[ ] My project uses {renv}.[ ] the output ofpackageVersion('renv')
I was wondering if this is the same as #589, but it #589 already fails on installing the hook, whereas in my case it only fails open executing the hook. I also tried the pre-commit version from the branch you mention in that issue and it didn't help.
The text was updated successfully, but these errors were encountered: