thisisnic opened a new issue, #47936:
URL: https://github.com/apache/arrow/issues/47936
### Describe the enhancement requested
The script `r/data-raw/docgen.R` has a circular dependency that requires
having the current branch version of arrow installed to generate docs correctly.
**The Problem:**
`docgen.R` reads from the **installed** arrow package to generate
documentation:
- Line 131: `docs <- arrow:::.cache$docs`
- Line 177: `arrow:::supported_dplyr_methods`
- Line 200: `length(arrow::list_compute_functions())`
This creates a chicken-and-egg problem:
1. Developer adds new function mappings or dplyr methods in current branch
2. Developer runs `data-raw/docgen.R` to regenerate docs
3. Script reads from **installed** package, not current working code
4. Generated docs are based on old installed version, missing new changes
5. Developer must install current branch first to generate correct docs
**Proposed Solution:**
Since `docgen.R` is a developer-only script (in `data-raw/`, not run
during package build), it could use `devtools::load_all()` to
load the current development version before reading from `.cache$docs`:
```r
# At the top of docgen.R, before line 131
devtools::load_all() # Load current branch, not installed package
# Then this will use the current branch's .cache
docs <- arrow:::.cache$docs
```
This would ensure the generated documentation reflects the current working
code rather than the installed package.
### Component(s)
R
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]