Repository navigation
Fix downstream module macro access to legacy RDB depth config - #1670
Merged
AvivDavid23 merged 2 commits intoOct 12, 2026
Merged
Conversation
AvivDavid23
deleted the
codex/fix-module-macro-legacy-depth-visibility
branch
October 12, 2026 11:50
Codecov Report✅ All modified and coverable lines are covered by tests. 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. 🚀 New features to boost your workflow:
|
This was referenced Oct 12, 2026
Merged
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.
Downstream crates using
redis_json_module_create!withas-libraryfail withE0603because the exported macro referencesbackward::LEGACY_RDB_DEPTH_LIMITthrough 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
backwardmodule stays private and the configuration continues to use the same static.Validation on macOS with Rust 1.92:
cargo checkagainst the visibility fix using temporary Cargo path patches: passed; existing warnings remain.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
E0603for downstream crates that expandredis_json_module_create!withas-library: the macro’sjson-legacy-rdb-depth-limitconfig usedbackward::LEGACY_RDB_DEPTH_LIMIT, butbackwardis private outside the crate.LEGACY_RDB_DEPTH_LIMITis 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 privatebackwardmodule are unchanged.Reviewed by Cursor Bugbot for commit 95fcaad. Bugbot is set up for automated code reviews on this repo. Configure here.