Merged
Conversation
Add support for all remaining R CLI flags to prevent errors when tools like R-nvim pass R-standard flags to arf. Functional flags (forwarded to R): - -f/--file: script input file (alias for positional SCRIPT arg) - --restore: restore previously saved objects - --max-connections, --max-ppsize, --min-nsize, --min-vsize: R memory tuning No-op flags (accepted silently for compatibility): - --verbose, --encoding, --gui/-g, --arch, --args - --debugger/-d, --debugger-args Also fixes --restore-data being passed to R (not a valid R flag); now correctly passes --restore. Closes #110 Co-Authored-By: Claude Opus 4.6 <[email protected]>
Document that arf's --args does not consume trailing arguments unlike R's behavior, so unknown flags after --args will still cause a parse error. Co-Authored-By: Claude Opus 4.6 <[email protected]>
On Windows, Instant is relative to boot time, so subtracting a duration longer than system uptime causes a panic. Use checked_sub and skip the test if uptime is too short. Co-Authored-By: Claude Opus 4.6 <[email protected]>
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
-f/--fileflag as alias for positionalSCRIPTargument (closes Making arf play nicely with R-nvim #110)--restore,--args, and memory tuning flags (--max-connections,--max-ppsize,--min-nsize,--min-vsize) forwarded to R--verbose,--encoding,--gui,--arch,--debugger,--debugger-args--restore-dataincorrectly passed to R (not a valid R flag); now correctly passes--restoreBackground
After #109, the same user reported #110 — R-nvim passes
-fto arf which was rejected. Rather than playing whack-a-mole with individual flags, this PR systematically adds all remaining flags fromR --helpso that tools like R-nvim, ESS, and others can launch arf without errors.All new flags are hidden from short help (
-h). Functional flags are forwarded to R; others are accepted silently as no-ops.Test plan
cargo clippypassesarf -f /dev/null,arf --args,arf --max-ppsize=200000 --verbose --encoding=UTF-8 --gui=X11 --arch=x86_64 -d gdb --debugger-args=-q --restoreall accepted🤖 Generated with Claude Code