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

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

Open
mbjones opened this issue Feb 24, 2024 · 2 comments
Open

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

mbjones opened this issue Feb 24, 2024 · 2 comments
Assignees
Labels
Milestone

Comments

@mbjones
Copy link
Member

mbjones commented Feb 24, 2024

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
r-lib/roxygen2#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
Copy link
Member Author

mbjones commented Feb 24, 2024

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
Copy link
Member Author

mbjones commented Feb 24, 2024

@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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

1 participant