Skip to content

docs: Pin max.print so rendering README.md is reproducible - #759

Merged
krlmlr merged 1 commit into
mainfrom
claude/readme-max-print
Sep 26, 2026
Merged

krlmlr merged 1 commit into
mainfrom
claude/readme-max-print

Conversation

@krlmlr

@krlmlr krlmlr commented Sep 26, 2026

Copy link
Copy Markdown
Member

Rendering README.Rmd on a clean machine does not reproduce the committed README.md.

The dbReadTable() example prints mtcars, and whether that output is truncated is decided by max.print, which this file never sets and which no .Rprofile in the repository sets either. R's default is 99999, so a clean render prints all 32 rows. The committed README.md instead shows the 9-row form ending in [ reached 'max' / getOption("max.print") -- omitted 23 rows ], which means it was rendered under a personal options(max.print = 99). Anyone who re-renders without that setting produces a 23-row diff they did not intend.

Pinning the option in the setup chunk makes the truncation a property of the file rather than of whoever renders it. Verified against the current CRAN toolchain (knitr 1.52, rmarkdown 2.32, downlit 0.4.5, commonmark 2.0.0): with this change a clean render reproduces the committed README.md byte for byte, which is why README.md is not touched here and the diff is a single file.

Found while checking README rendering stability across the package fleet. Of the repositories that render a README, most are already reproducible; this one and RSQLite shared this max.print dependency.

One related observation, deliberately left out of this PR: rendering also rewrites index.md, because the cynkratemplate version installed here (0.0.2.9028) does not emit the <!-- Generated by cynkratemplate: do not edit by hand --> banner that the committed index.md carries. That is a cynkratemplate version skew rather than anything wrong in this repository, so index.md is left untouched.

🤖 Generated with Claude Code

https://claude.ai/code/session_01WWhverMTZZKgEpUuTK117m


Generated by Claude Code

…enderer

Rendering `README.Rmd` on a clean machine does not reproduce the committed
`README.md`.
The `dbReadTable()` example prints `mtcars`, and whether that output is
truncated is decided by `max.print`, which this file never sets.
R's default is 99999, which prints all 32 rows;
the committed `README.md` shows the 9-row form with the
`[ reached 'max' / getOption("max.print") -- omitted 23 rows ]` marker,
so it was rendered under a personal `options(max.print = 99)`.

Pinning the option in the setup chunk makes the output the file's own property
rather than the renderer's.
With this change a clean render reproduces the committed `README.md` byte for
byte, so `README.md` itself is unchanged here and the diff is one file.

Co-Authored-By: Claude Opus 5 <[email protected]>
Claude-Session: https://claude.ai/code/session_01WWhverMTZZKgEpUuTK117m
@krlmlr
krlmlr merged commit 08c8c4c into main Sep 26, 2026
6 checks passed
@krlmlr
krlmlr deleted the claude/readme-max-print branch September 26, 2026 17:24
@krlmlr krlmlr mentioned this pull request Nov 28, 2026
3 of 7 tasks
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