Repository navigation
Restore NAMESPACE exports wiped by the v1.2.5 regenerate commit - #51
Conversation
…es" commit Commit b164f79 ("Bump to v1.2.5 and regenerate package files") reduced NAMESPACE from 84 export()/exportPattern lines down to just the "Generated by roxygen2" header comment - every single function in the package stopped being exported, even though all ~80 functions in R/Stringendo.R still carry their `@export` roxygen tag untouched. Nothing in the source changed; NAMESPACE was left empty by whatever ran that day (most likely roxygen2::document() erroring out partway through, or being run against a build directory that failed to load, and silently writing an incomplete file instead of failing loudly). Impact: this doesn't just affect Stringendo's own users calling `library(Stringendo)` - it's a hard, immediate crash for every downstream @vertesy package that Depends on or Imports from Stringendo. Concretely: `CodeAndRoll2` (Depends: Stringendo) does `importFrom(Stringendo, percentage_formatter)` in its own NAMESPACE; with that export gone, `requireNamespace("CodeAndRoll2")` itself fails with "object 'percentage_formatter' is not exported by 'namespace:Stringendo'" - so CodeAndRoll2 cannot load, which means UVI.tools (Depends: CodeAndRoll2) cannot load either. Confirmed this is not an isolated example: the diff below restores 82 export() lines that were present before b164f79 and match the `@export` tags still in R/Stringendo.R today. Fix: ran `devtools::document(roclets = c("namespace", "rd"))` against the current source (no source changes were needed or made - only NAMESPACE was regenerated). Verification: - `getNamespaceExports("Stringendo")` includes `percentage_formatter` again after installing this fix locally - Confirmed the full downstream chain: `requireNamespace("CodeAndRoll2")` now succeeds, and `devtools::load_all()` on UVI.tools (which Depends on CodeAndRoll2) now succeeds too - both were failing before this fix - devtools::check() run on this branch: 1 ERROR, 3 WARNINGs, 1 NOTE, none of which are caused by this change or touch NAMESPACE/exports - the ERROR is a pre-existing, unrelated bug in the deprecated `parFlags()` ("object 'namez' not found"), and the WARNINGs/NOTE are pre-existing Rd/documentation issues (`%!in%`'s Rd \name, a stale idate.Rd cross-reference, an undocumented parsepvalue() argument, and some "no visible global variable" NOTEs) that predate this commit and are unrelated to exports - lintr run on the changed file Note: there are several other open PRs against this repo (#43-#50) addressing narrower, unrelated bugs in individual functions - this PR is scoped only to restoring the wiped NAMESPACE and doesn't overlap with any of them. Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 0e8b2a86b8
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
| @@ -1,2 +1,84 @@ | |||
| # Generated by roxygen2: do not edit by hand | |||
|
|
|||
| export("%!in%") | |||
There was a problem hiding this comment.
Repair generation before restoring NAMESPACE
Problem: This commit restores only the generated NAMESPACE; it does not fix the generation path that erased every export in b164f79. Trigger: The next run of PackageTools::document_and_create_package() in Development/Create_the_Stringendo_Package.R can overwrite these entries again, leaving all public Stringendo functions unavailable to dependent packages. Fix: Correct the upstream generation step, then regenerate and commit NAMESPACE from the roxygen annotations.
AGENTS.md reference: AGENTS.md:L34-L38
Useful? React with 👍 / 👎.
|
@claude 1 2 |
|
Claude finished @vertesy's task in 3m 17s —— View job Summary
1. Codex comment — "Repair generation before restoring NAMESPACE"I agree with the underlying concern, but with a scope caveat:
Since I can't touch the upstream package, I added the next best thing directly in this repo: a PackageTools::document_and_create_package(repository.dir, config_file = 'config.R')
namespace.lines <- readLines(file.path(repository.dir, "NAMESPACE"))
stopifnot("NAMESPACE regeneration produced no exports (roxygen2::document() likely failed silently) - fix before committing" = any(grepl("^export", namespace.lines)))This directly targets the "Trigger" Codex flagged — the next run of that script can no longer silently overwrite all exports; it will stop before the commit step. Pushed as (Note: I could not run 2. Is this PR still relevant?I checked the current tips of both target branches (fetched as part of the checkout, timestamps ~2026-08-30 22:4x, i.e. very recent):
So: as opened (base =
I did not close or retarget the PR myself — that's a call for you to make, and retargeting/closing isn't something I can do here. Branch: |
Restore NAMESPACE exports wiped by the v1.2.5 "regenerate package files" commit
Commit b164f79 ("Bump to v1.2.5 and regenerate package files") reduced
NAMESPACE from 84 export()/exportPattern lines down to just the
"Generated by roxygen2" header comment - every single function in the
package stopped being exported, even though all ~80 functions in
R/Stringendo.R still carry their
@exportroxygen tag untouched. Nothingin the source changed; NAMESPACE was left empty by whatever ran that day
(most likely roxygen2::document() erroring out partway through, or being
run against a build directory that failed to load, and silently writing
an incomplete file instead of failing loudly).
Impact: this doesn't just affect Stringendo's own users calling
library(Stringendo)- it's a hard, immediate crash for every downstream@vertesy package that Depends on or Imports from Stringendo. Concretely:
CodeAndRoll2(Depends: Stringendo) doesimportFrom(Stringendo, percentage_formatter)in its own NAMESPACE; withthat export gone,
requireNamespace("CodeAndRoll2")itself fails with"object 'percentage_formatter' is not exported by 'namespace:Stringendo'"
CodeAndRoll2) cannot load either. Confirmed this is not an isolated
example: the diff below restores 82 export() lines that were present
before b164f79 and match the
@exporttags still in R/Stringendo.R today.Fix: ran
devtools::document(roclets = c("namespace", "rd"))against thecurrent source (no source changes were needed or made - only NAMESPACE
was regenerated).
Verification:
getNamespaceExports("Stringendo")includespercentage_formatteragain after installing this fix locally
requireNamespace("CodeAndRoll2")now succeeds, and
devtools::load_all()on UVI.tools (which Depends onCodeAndRoll2) now succeeds too - both were failing before this fix
of which are caused by this change or touch NAMESPACE/exports - the
ERROR is a pre-existing, unrelated bug in the deprecated
parFlags()("object 'namez' not found"), and the WARNINGs/NOTE are pre-existing
Rd/documentation issues (
%!in%'s Rd \name, a stale idate.Rdcross-reference, an undocumented parsepvalue() argument, and some
"no visible global variable" NOTEs) that predate this commit and are
unrelated to exports
Note: there are several other open PRs against this repo (#43-#50)
addressing narrower, unrelated bugs in individual functions - this PR is
scoped only to restoring the wiped NAMESPACE and doesn't overlap with
any of them.
Co-Authored-By: Claude Sonnet 5 noreply@anthropic.com