crrri icon indicating copy to clipboard operation
crrri copied to clipboard

Document R6 class

Open cderv opened this issue 4 years ago • 1 comments

This PR will close #84

  • https://www.tidyverse.org/blog/2019/11/roxygen2-7-0-0/
  • https://roxygen2.r-lib.org/articles/rd.html#r6

cderv avatar May 24 '20 07:05 cderv

Currently it does not work as expected on my end.

If I use load = "source" in DESCRIPTION, or roxygen2::roxygenise(load_code = "source") I get warnings about the roxygen tags for method not being associated with the method. a getSrcRef issue...

Warning: [C:\Users\chris\Documents\DEV_R\00-project\crrri\R\EventEmitter.R:88] @description Cannot find matching R6 method
Warning: [C:\Users\chris\Documents\DEV_R\00-project\crrri\R\EventEmitter.R:89] @param Cannot find matching R6 method

If I use the default method, I get the error described in #84

> roxygen2::roxygenise(load_code = "pkgload")
Loading crrri
Writing NAMESPACE
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")`.

Again an issue with source reference.

I can't reproduce the issue with R6 documentation on a dummy package yet. It only happens with crrri... 🤯

cderv avatar May 24 '20 07:05 cderv