Skip to content
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

use_lifecycle() raises an error, uses_roxygen_md() is confused by roclets #2073

Closed
nkehrein opened this issue Oct 23, 2024 · 3 comments · Fixed by #2084
Closed

use_lifecycle() raises an error, uses_roxygen_md() is confused by roclets #2073

nkehrein opened this issue Oct 23, 2024 · 3 comments · Fixed by #2084

Comments

@nkehrein
Copy link

My package's DESCRIPTION file contains the following lines:

RoxygenNote: 7.3.2
Roxygen: list(markdown = TRUE, roclets = c("collate", "namespace", "rd",
    "roxyglobals::global_roclet"))

When I try to execute the following statement to add support for the lifecycle package:
> usethis::use_lifecycle()
Then the following error appears:

Error in if (!uses_roxygen_md()) { : 
  missing value where TRUE/FALSE needed

I have tested this with usethis version 3.0.0 and R 4.3.0.

As far as I can tell, the issue is because of this check, which doesn't seem to account for the existence of roclets in the config object.

@maelle
Copy link
Contributor

maelle commented Nov 21, 2024

I came here to open the same issue. 😸

Could the current condition be made more flexible, maybe only checking the string starts with list(markdown = TRUE? roxygen2 evaluates the field.

@maelle
Copy link
Contributor

maelle commented Nov 22, 2024

Thank you @jennybc 🙏

@nkehrein
Copy link
Author

Thanks!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants