From 0e8b2a86b81cac5af9f784d7fa6a816c24665eda Mon Sep 17 00:00:00 2001 From: Abel Vertesy Date: Sat, 29 Aug 2026 13:10:32 +0200 Subject: [PATCH 1/2] 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 `@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 --- NAMESPACE | 82 +++++++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 82 insertions(+) diff --git a/NAMESPACE b/NAMESPACE index 6ae9268..da5cc90 100644 --- a/NAMESPACE +++ b/NAMESPACE @@ -1,2 +1,84 @@ # Generated by roxygen2: do not edit by hand +export("%!in%") +export(AddTrailingDotIfMissing) +export(AddTrailingSlashIfMissing) +export(FixPath) +export(FixPlotName) +export(FixUnderscores) +export(FormatAsExcelLink) +export(HasNames) +export(ParseDirPath) +export(ParseFullFilePath) +export(PasteDirNameFromFlags) +export(PasteOutdirFromFlags) +export(RemoveFinalDot) +export(RemoveFinalSlash) +export(RemoveFinalUnderscores) +export(RemoveInitialDot) +export(RemoveTrailingDots) +export(RemoveWhitespaces) +export(ReplaceRepeatedDots) +export(ReplaceRepeatedSlashes) +export(ReplaceRepeatedUnderscores) +export(ReplaceRepeatedWhitespaces) +export(ReplaceSpecialCharacters) +export(countDotOrUnderscoreSeparated) +export(eval_parse_kollapse) +export(extPDF) +export(extPNG) +export(fix_special_characters_bash) +export(flag.name_value) +export(flag.nameiftrue) +export(flag.names_list) +export(format_number_h) +export(idate) +export(ifExistsAndTrue) +export(ifExistsElse) +export(imessage) +export(iprint) +export(is.character.or.NULL) +export(is.numeric.or.logical) +export(kollapse) +export(kpipe) +export(kpnl) +export(kpp) +export(kppc) +export(kppd) +export(kpps) +export(kppu) +export(kppws) +export(kpwNames) +export(message2) +export(pad.na) +export(parFlags) +export(parFlags2) +export(param.list.2.fname) +export(param.list.flag) +export(parseParamStringWNames) +export(parsepvalue) +export(percentage_formatter) +export(percentile2value) +export(ppc) +export(ppcol) +export(ppd) +export(ppipe) +export(ppnl) +export(ppp) +export(pps) +export(ppu) +export(sppp) +export(spps) +export(sppu) +export(stopif) +export(substitute_deparse) +export(substrRight) +export(toCamelCase) +export(toDotSeparated) +export(toSentence) +export(toUnderscoreSeparated) +export(warnif) +export(warnifnot) +export(ww.break.lines) +importFrom(clipr,write_clip) +importFrom(dplyr,case_when) From 6822e0412191a6109c64ebe5dcf421c34f394fc3 Mon Sep 17 00:00:00 2001 From: "claude[bot]" <41898282+claude[bot]@users.noreply.github.com> Date: Sun, 30 Aug 2026 20:49:43 +0000 Subject: [PATCH 2/2] Add fail-loud guard against silent NAMESPACE wipes in package build script Addresses PR #51 review feedback: a future document_and_create_package() run (the same call that produced the empty NAMESPACE in b164f79) will now stop with an error instead of silently writing an export-less NAMESPACE. Co-authored-by: Abel Vertesy <5101911+vertesy@users.noreply.github.com> --- Development/Create_the_Stringendo_Package.R | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/Development/Create_the_Stringendo_Package.R b/Development/Create_the_Stringendo_Package.R index 6da1fca..e89d11e 100644 --- a/Development/Create_the_Stringendo_Package.R +++ b/Development/Create_the_Stringendo_Package.R @@ -36,6 +36,8 @@ for (scriptX in ls.scripts.full.path) { # Automated Codebase linting to tidyverse style ------------------------------------------------ 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))) 'git add commit push to remote' @@ -108,6 +110,7 @@ file.edit(paste0(repository.dir, "README.md")) 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)))