Skip to content

docs: Name the C function the motifs links actually point at - #2904

Closed
krlmlr wants to merge 1 commit into
claude/sembrfrom
claude/fix-man-drift
Closed

krlmlr wants to merge 1 commit into
claude/sembrfrom
claude/fix-man-drift

Conversation

@krlmlr

@krlmlr krlmlr commented Sep 13, 2026

Copy link
Copy Markdown
Contributor

Closing: main already has this fix. Commit 87885a001a ("chore: Auto-update from GitHub Actions") made the identical two-line change to man/motifs.Rd and man/graph.motifs.Rd, so main's motifs.Rd contains no motifs_randesu_callback_closure at all. This repository's CI roxygenizes and commits back, and that mechanism corrected the drift on its own while this PR was open.

The analysis stands even though the change is no longer needed, and two parts of it are worth keeping on the record:

The fix was right for the right reason. igraph_motifs_randesu_callback_closure() is a rigraph-side wrapper defined in src/rcallback.c, not a C-library symbol, so the link text named a function that does not exist in the documentation it pointed at. tools/rebuild-cats.R and tools/split-aaa-auto.R both carry the ..._closure... mapping explicitly, under a comment saying it was verified against src/rcallback.c.

The man/as_phylo.Rd claim in #2903 is wrong and should be disregarded. That PR reports three files drifting on a pristine regeneration. Only two did. as_phylo() carries @inheritParams ape::as.phylo, and ape — a declared Suggests — was not installed in the environment that made the observation, so roxygen2 silently resolved the inherited ... to nothing and regeneration deleted \item{...}{further arguments to be passed to or from other methods.}. Since \usage{} is as_phylo(x, ...), committing that would have left ... undocumented and tripped R CMD check. With ape installed, that file regenerates byte-identical to what is committed.

🤖 Generated with Claude Code

https://claude.ai/code/session_01WWhverMTZZKgEpUuTK117m

`man/graph.motifs.Rd` and `man/motifs.Rd` showed
`motifs_randesu_callback_closure()` as the link text for a reference
whose anchor is `#igraph_motifs_randesu_callback`. The displayed name
and the destination disagreed.

`_closure` is an R-side implementation detail: the generated wrapper is
`motifs_randesu_callback_closure_impl()` in R/aaa-motifs.R. There is no
such C symbol -- the link cache lists only
`igraph_motifs_randesu_callback` -- so the text named something that
does not exist in the C documentation being linked to.

The current `igraph.r2cdocs` roclet derives the text from the symbol and
gets this right. Regenerating is the whole change; no source was edited.

The stale text was committed on 2026-08-04 in "docs: Revdep results
before PR", by a regeneration under an older roclet.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01WWhverMTZZKgEpUuTK117m
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant