Repository navigation
docs: Pin max.print so rendering README.md is reproducible - #759
Merged
Merged
Conversation
…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
3 of 7 tasks
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.
Rendering
README.Rmdon a clean machine does not reproduce the committedREADME.md.The
dbReadTable()example printsmtcars, and whether that output is truncated is decided bymax.print, which this file never sets and which no.Rprofilein the repository sets either. R's default is 99999, so a clean render prints all 32 rows. The committedREADME.mdinstead shows the 9-row form ending in[ reached 'max' / getOption("max.print") -- omitted 23 rows ], which means it was rendered under a personaloptions(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.mdbyte for byte, which is whyREADME.mdis 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.printdependency.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 committedindex.mdcarries. That is a cynkratemplate version skew rather than anything wrong in this repository, soindex.mdis left untouched.🤖 Generated with Claude Code
https://claude.ai/code/session_01WWhverMTZZKgEpUuTK117m
Generated by Claude Code