ropensci / redland-bindings

Redland librdf language bindings
http://librdf.org/bindings/
Other
17 stars 3 forks source link

fix package-level docs to generate alias without @docType #107

Open mbjones opened 9 months ago

mbjones commented 9 months ago

Dear maintainer,

You have file 'redland/man/redland.Rd' with \docType{package}, likely intended as a package overview help file, but without the appropriate PKGNAME-package \alias as per "Documenting packages" in R-exts.

This seems to be the consequence of the breaking change

Using @docType package no longer automatically adds a -package alias. Instead document _PACKAGE to get all the defaults for package documentation.

in roxygen2 7.0.0 (2019-11-12) having gone unnoticed, see https://github.com/r-lib/roxygen2/issues/1491.

As explained in the issue, to get the desired PKGNAME-package \alias back, you should either change to the new approach and document the new special sentinel

"_PACKAGE"

or manually add

@aliases redland-package

if remaining with the old approach.

Please fix in your master sources as appropriate, and submit a fixed version of your package within the next few months.

Best, -k

mbjones commented 9 months ago

Working on this in branch bug-107-fix-package-docs but I'm running into an error using roxygen2 to generate the docs. Here's the error when I run roxygen2::roxyngenize():

Error in assign(name, fdef, where) : 
  cannot change value of locked binding for 'delete'
View stacktrace ``` 11. assign(name, fdef, where) 10. .GenericAssign(name, fdef, where) 9. setGeneric("delete", function(obj) standardGeneric("delete")) at redland.R#62 8. eval(ei, envir) 7. eval(ei, envir) 6. withVisible(eval(ei, envir)) 5. source(file = filePath, local = as.environment(tmpEnv)) at mergeNamespace_roclet.R#64 4. roclet_process.roclet_mergeNamespace(X[[i]], ...) 3. FUN(X[[i]], ...) 2. lapply(roclets, roclet_process, blocks = blocks, env = env, base_path = base_path) 1. roxygen2::roxygenize() ```

The error seems to be complaining about the definition of the generic function for delete in https://github.com/ropensci/redland-bindings/blob/bug-107-fix-package-docs/R/redland/R/redland.R#L62 but I am not clear on why this is cropping up now but not historically.

mbjones commented 9 months ago

@jeroen @cboettig or other R gurus -- any pointers on this roxygen issue for redland? Seems like a pretty generic (ha!) problem. I should have submitted this with the last release but I needed to get it done today to avoid getting archived.