zoonproject / zoon

The zoon R package
Other
61 stars 13 forks source link

Failure with dev roxygen2 #425

Open hadley opened 4 years ago

hadley commented 4 years ago
── 1. Error: Check returns list with all the names (@testZoonCitation.R#13)  ────────────────────────────────────────────────
wrong arguments for subsetting an environment
1: ZoonCitation("LogisticRegression") at testthat/testZoonCitation.R:13
2: ZoonModuleParse(ModuleURL) at /Users/hadley/Documents/devtools/roxygen/revdep/checks.noindex/zoon/new/zoon.Rcheck/00_pkg_src/zoon/R/ZoonCitation.R:24
3: lapply(names(rd), function(field, x) x[[1]][[field]]$values, rd) at /Users/hadley/Documents/devtools/roxygen/revdep/checks.noindex/zoon/new/zoon.Rcheck/00_pkg_src/zoon/R/ZoonModuleParse.R:59
4: FUN(X[[i]], ...)

We're planning to release roxygen2 in the very near future, so it would be wonderful if you could take a quick look at this.

AugustT commented 4 years ago

It looks like the error originates in the handling of the object created here:

https://github.com/zoonproject/zoon/blob/628a1d771cfb2ca98eec3a803918ada3b72de2be/R/ZoonModuleParse.R#L21

I'm guessing the output format of roxygen2::roc_proc_text has changed since the previous version.

hadley commented 4 years ago

Ah yes, the structure of the returned objects has totally changed — it's now documented in https://roxygen2.r-lib.org/articles/extending.html, and please let me know if anything isn't obvious.

The comments in that file mention that roxygen2::read_file() isn't exported; it is now so you might be able to simplify some code.

AugustT commented 4 years ago

We can use packageVersion("roxygen2") to create an if that handles this new structure. I'll look into read_file but I think it will be fair straightforward anyway from what testing I have done already.

hadley commented 4 years ago

Is it ok for me to submit roxygen2 to CRAN, telling them that you're aware of the problem and are working on it?

AugustT commented 4 years ago

Yes, I don't want to hold you up, it isn't core functionality in this package, and I think I can fix it fairly easily (once I find the time!)

hadley commented 4 years ago

Awesome, thanks! And please feel free to ping me if you get stuck and I can take a look.