Address CRAN 0.2.0 reviewer feedback; bump to 0.2.1#5
Merged
TroyHernandez merged 2 commits intomainfrom Apr 22, 2026
Merged
Conversation
* DESCRIPTION: add reference URLs to 'Writing R Extensions' and the
CRAN Repository Policy (reviewer asked for "references describing
the methods ... or if those are not available: <https:...>").
* Examples: rewrite most \dontrun{} examples to be executable against
a throwaway package scaffolded in tempdir(). The remaining
non-runnable examples (install, reload, check, check_win_devel,
submit_cran) use \donttest{} + if(interactive()) and explain why.
* Writing functions: remove default path. use_version() and
use_github_action() now require an explicit path. build()'s
dest_dir defaults to tempdir() instead of getwd().
* Internal: invoke R via file.path(R.home("bin"), "R") instead of
bare 'R' on PATH (WRE 1.6 — surfaces only when examples are
actually run under R CMD check).
* .Rbuildignore: add ^\.claude$ so Claude Code local state is not
bundled into the tarball.
Retake on the file-write rule after re-reading the CRAN cookbook.
The rule isn't "writing functions must have no default" — it's that
a default must be tempdir(), an R_user_dir() cache/config/data path,
an explicit caller arg, or no default at all. Never the user's home
filespace (which includes getwd()).
* build(): dest_dir now defaults to tools::R_user_dir("tinypkgr",
"cache") instead of ".". Tarballs persist in ~/.cache/R/tinypkgr/
so they survive across sessions, and they're never in getwd().
* use_version() and use_github_action(): path required, no default.
These edit files under path, so R_user_dir doesn't apply; the
only CRAN-safe option is to force the caller to pass a path.
* DESCRIPTION: add Wickham and Bryan (2023, ISBN:9781098134945) to
the references alongside the existing URLs.
NEWS.md and cran-comments.md updated to match. R CMD check --as-cran
passes with 0 errors, 0 warnings, and only the routine "New
submission" note.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Addresses the CRAN reviewer feedback on 0.2.0:
\dontrun{}examples to scaffold a throwaway package intempdir()and actually run duringR CMD check. The five that genuinely can't run (install,reload,check,check_win_devel,submit_cran) use\donttest{}+if (interactive())with comments explaining why.use_version()anduse_github_action()now require an explicitpath. They edit files underpath, sotempdir()/R_user_dir()don't apply; the only CRAN-safe option is to force the caller to pass one.build()now defaultsdest_dirtotools::R_user_dir("tinypkgr", "cache")(e.g.~/.cache/R/tinypkgr/on Linux) — CRAN's recommended location for persistent per-package artifacts.Also fixed
system("R CMD ...")calls now go throughfile.path(R.home("bin"), "R")per Writing R Extensions 1.6. The bare-Rbug was latent; only the new runnable examples exposed it.^\.claude$added to.Rbuildignoreso Claude Code's local state dir can't leak into a future tarball.Checks
R CMD check --as-cran: 0 errors, 0 warnings, 0 notes (beyond the routine "New submission").Test plan
tinypkgr::check()clean locallytinypkgr::check_win_devel()clean on win-buildertinytest::test_package("tinypkgr")38/38 passing