Skip to content

[R] docgen.R requires installed package instead of current working code #47936

@thisisnic

Description

@thisisnic

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:

# 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

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions