Skip to content

Fix downstream module macro access to legacy RDB depth config - #1670

Merged
AvivDavid23 merged 2 commits into
masterfrom
codex/fix-module-macro-legacy-depth-visibility
Oct 12, 2026
Merged

AvivDavid23 merged 2 commits into
masterfrom
codex/fix-module-macro-legacy-depth-visibility

Conversation

@AvivDavid23

@AvivDavid23 AvivDavid23 commented Oct 12, 2026 •

Copy link
Copy Markdown
Contributor

Downstream crates using redis_json_module_create! with as-library fail with E0603 because the exported macro references backward::LEGACY_RDB_DEPTH_LIMIT through a private module.

Re-export the existing static at the crate root (hidden from generated docs) and use that public path in the macro. The backward module stays private and the configuration continues to use the same static.

Validation on macOS with Rust 1.92:

  • Downstream HDT cargo check against the visibility fix using temporary Cargo path patches: passed; existing warnings remain.
  • Release Clippy with CI warning flags: passed.
  • Formatting and diff checks: passed.

Redis runtime flow tests were not run; this change only fixes macro visibility.


Note

Low Risk
Visibility-only change for macro expansion; the legacy RDB depth config still binds to the same static with no logic changes.

Overview
Fixes E0603 for downstream crates that expand redis_json_module_create! with as-library: the macro’s json-legacy-rdb-depth-limit config used backward::LEGACY_RDB_DEPTH_LIMIT, but backward is private outside the crate.

LEGACY_RDB_DEPTH_LIMIT is now #[doc(hidden)] re-exported at the crate root, and the macro registers the same static via &$crate::LEGACY_RDB_DEPTH_LIMIT. Runtime behavior and the private backward module are unchanged.

Reviewed by Cursor Bugbot for commit 95fcaad. Bugbot is set up for automated code reviews on this repo. Configure here.

@AvivDavid23
AvivDavid23 merged commit 1821dd2 into master Oct 12, 2026
4 checks passed
@AvivDavid23
AvivDavid23 deleted the codex/fix-module-macro-legacy-depth-visibility branch October 12, 2026 11:50
@codecov

codecov Bot commented Oct 12, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 88.25%. Comparing base (4635c87) to head (95fcaad).
⚠️ Report is 1 commits behind head on master.

Additional details and impacted files
@@           Coverage Diff           @@
##           master    #1670   +/-   ##
=======================================
  Coverage   88.25%   88.25%           
=======================================
  Files          17       17           
  Lines        6073     6073           
=======================================
  Hits         5360     5360           
  Misses        713      713           

☔ View full report in Codecov by Harness.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

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