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

Documentation build error #156

Closed
khusmann opened this issue Oct 9, 2023 · 3 comments · Fixed by #183
Closed

Documentation build error #156

khusmann opened this issue Oct 9, 2023 · 3 comments · Fixed by #183
Assignees
Labels
dependency Caused by or related to a dependency
Milestone

Comments

@khusmann
Copy link
Contributor

khusmann commented Oct 9, 2023

FYI, when running devtools::document(), the build fails with the following warning/error when rlist is not installed:

ℹ Updating frictionless documentation
ℹ Loading frictionless
Warning message:
[utils.R:36] @description refers to unavailable topic rlist::list.clean
Caused by error in `find.package()`:
! there is no package called ‘rlist’ 

Not sure if there's any way around this... is it possible to make this reference valid without installing rlist?

Alternatively, you might consider just using purrr::keep, purrr::discard, and purr:compact, I think they do basically the same thing and you're already requiring purrr.

In any case, it's very low priority because it's an internal function & only affect developers -- just wanted to give you the heads up.

@peterdesmet
Copy link
Member

Thanks for reporting. The culprit might be:

#' Function is copied and adapted from [rlist::list.clean()] (MIT licensed), to

in a helper function which merely mentions rlist in the function description. I did not realize devtools::document() requires referenced functions to be installed. I think we can remove the reference (or write it differently), no Rd is created anyway.

@peterdesmet peterdesmet added this to the 1.1.0 milestone Oct 9, 2023
peterdesmet added a commit that referenced this issue Mar 15, 2024
By using backticks, Roxygen will just create:

```
\code{}
```

Not:

```
\code{\link[]{}}
```

And not generate an error if rlist is not installed by the contributing developer.
@peterdesmet peterdesmet mentioned this issue Mar 15, 2024
@peterdesmet
Copy link
Member

@khusmann you suggest to use purrr::compact() which indeed does the default functionality of clean_list(), but only at one level deep. Is there a way to do this recursively? If not, then I'll just keep my helper function.

@peterdesmet peterdesmet self-assigned this Mar 15, 2024
@peterdesmet peterdesmet added the dependency Caused by or related to a dependency label Mar 15, 2024
@khusmann
Copy link
Contributor Author

I believe early versions of purrr included recursive options for some of its functions like this, but they have since been removed because they are "hard to get right". Looks like that discussion resulted in modify_tree()

So a recursive compact() on list x would be: modify_tree(x, post = compact). But if that's too verbose, keeping the helper function is nbd.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
dependency Caused by or related to a dependency
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants