rpkg: surface status/get summary messages in R console#155
Draft
CGMossa wants to merge 2 commits into
Draft
Conversation
Contributor
Author
|
The implementation of this PR supports adding list(result = , error = )|[all result or all error]. |
c091a59 to
ac3f6d5
Compare
ac3f6d5 to
ca276b3
Compare
- dvs_add/get/status: warning() for each per-file error (mirrors CLI eprintln!)
- dvs_status: message() when result is empty ("No tracked files" / "...matching the filter")
- dvs_get: message() with total file count and size after successful retrieval
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
ca276b3 to
0bfda3b
Compare
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.
AI-written details
Summary
The dvs CLI prints two informational lines that the R package was silently dropping:
println!("No tracked files")/"...matching the filter"fromdvs statuswhen the result is empty.println!("Total: N files, X")fromdvs getsummarizing copied files.dvs-rpkg/R/dvs-commands.R(+15 lines, only file touched) now mirrors both:dvs_status()emitsmessage("No tracked files")ormessage("No tracked files matching the filter")depending on whether all three states or a subset is requested.dvs_get()emitsmessage("Total: <N> files, <size>")whenever at least one file was actually copied.Uses
message()(notwarning()) so output reaches the console without being treated as a condition:tryCatch/withCallingHandlerswarning =handlers don't fire on it, interactive and non-interactive sessions both see it.Per-file errors are not surfaced via
warning()— they're already rows in the returned data frame, which is the contract the rest ofdvs_*follows. Deliberate narrowing from an earlier draft that warned per row.Test plan
devtools::test('dvs-rpkg')passesdvs_status()against an empty repo printsNo tracked filesand returns the empty tibbledvs_status(status = "absent")against an empty filter result prints...matching the filterdvs_get(...)after at least one copy printsTotal: N files, <human-size>Drafted by Claude (claude-opus-4-7). Reviewed by the author.