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

Document R6 class using new roxygen feature #84

Open
cderv opened this issue Oct 5, 2019 · 5 comments · May be fixed by #98
Open

Document R6 class using new roxygen feature #84

cderv opened this issue Oct 5, 2019 · 5 comments · May be fixed by #98

Comments

@cderv
Copy link
Collaborator

cderv commented Oct 5, 2019

This is now possible to document R6 method using roxygen.
https://roxygen2.r-lib.org/articles/rd.html#r6

We have already documented but it could be an improvement and easier to maintain.
I hope the help page is organized clearer also.

Just putting this here as an idea for when we have time.

@RLesur
Copy link
Owner

RLesur commented Oct 5, 2019

I haven't seen that. Excellent!

@cderv
Copy link
Collaborator Author

cderv commented Mar 21, 2020

There an issue to fix here

==> devtools::document(roclets = c('rd', 'collate', 'namespace'))

Updating crrri documentation
Loading crrri
Error in .f(.x[[i]], ...) : 
  R6 class (EventEmitter) without source references. If you use the `installed` load method in `DESCRIPTION`, then try re-installing the package with option '--with-keep.source'. E.g. `install.packages(..., INSTALL_OPTS = "--with-keep.source")`.
Calls: suppressPackageStartupMessages ... extract_r6_self_data -> rbind -> extract_r6_methods -> map_int -> .f
Excution arrte

Exited with status 1.

Should look into it.

@cderv
Copy link
Collaborator Author

cderv commented May 22, 2020

It seems we have a special case somewhere not handled by roxygen2 R6 support
See r-lib/roxygen2#1014
We will deactivate it for now

@cderv
Copy link
Collaborator Author

cderv commented May 22, 2020

And we have the issue above only with the default load method in roxygenise

# does not work
roxygen2::roxygenise(load_code = "pkgload")
# works
roxygen2::roxygenise(load_code = "source")

We could use Roxygen: list(load = "source") in DESCRIPTION to change the default. But I am still puzzled why the default does not work... 🤔

@cderv
Copy link
Collaborator Author

cderv commented May 22, 2020

Note to self: Roxygen: list(load = "source") is taken into account by devtools::document() in console but not by CTRL + SHIFT + D or Document in IDE Build pane
Seems to be a bug... must find a minimal reproducible example. We can reproduce using this package state but it is an heavy example

@cderv cderv linked a pull request May 24, 2020 that will close this issue
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