Skip to content

feat: add rsync_error_fmt! macro with upstream-compatible error format - #2904

Merged
oferchen merged 2 commits into
masterfrom
feat/error-source-file-macro
Mar 22, 2026
Merged

oferchen merged 2 commits into
masterfrom
feat/error-source-file-macro

Conversation

@oferchen

Copy link
Copy Markdown
Owner

Summary

  • Add rsync_error_fmt! and rsync_warning_fmt! macros to the logging crate that produce strings matching upstream rsync diagnostic format
  • Macros capture file!() and line!() at the call site, strip the repo prefix to yield crates/-relative paths, and embed CARGO_PKG_VERSION as the version
  • Exported helper functions format_rsync_error, format_rsync_warning, and strip_repo_prefix for programmatic use
  • Comprehensive unit tests verify format matches upstream rsync log.c / errcode.h (3.4.1)

Ref: upstream rsync log.c, errcode.h (rsync 3.4.1). Tasks #1132, #1311.

Test plan

  • CI passes fmt+clippy, nextest, Windows, macOS, Linux musl
  • Unit tests in error_format.rs verify upstream format structure
  • Macro tests confirm call-site capture of file/line and CARGO_PKG_VERSION
  • Path stripping tests cover Unix, Windows, and fallback cases

@oferchen
oferchen force-pushed the feat/error-source-file-macro branch from 746da74 to 7e1b02e Compare March 22, 2026 06:55
@oferchen
oferchen merged commit 5ef67c4 into master Mar 22, 2026
27 of 31 checks passed
oferchen added a commit that referenced this pull request May 1, 2026
#2904)

* feat: add rsync_error_fmt! macro with upstream-compatible error format

* style: fix cargo fmt formatting
oferchen added a commit that referenced this pull request May 5, 2026
#2904)

* feat: add rsync_error_fmt! macro with upstream-compatible error format

* style: fix cargo fmt formatting
oferchen added a commit that referenced this pull request May 25, 2026
…C-13) (#4920)

Adds a user-facing matrix at docs/user/windows-support-matrix.md that
states which features are fully supported, partially supported, or
unsupported on the Windows GNU build, and enumerates the known gaps
with explicit WPC-* tracking. Bridges the gap until WPC-3..WPC-12 land.

Refs #2869, #2903 (WPC-1), #2904 (WPC-2), #2915 (WPC-13).
oferchen added a commit that referenced this pull request Aug 24, 2026
…C-13) (#4920)

Adds a user-facing matrix at docs/user/windows-support-matrix.md that
states which features are fully supported, partially supported, or
unsupported on the Windows GNU build, and enumerates the known gaps
with explicit WPC-* tracking. Bridges the gap until WPC-3..WPC-12 land.

Refs #2869, #2903 (WPC-1), #2904 (WPC-2), #2915 (WPC-13).
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

enhancement New feature or request

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant