Repository navigation
Governor: fix re-exports - #605
Conversation
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: Organization UI Review profile: CHILL Plan: Pro Run ID: 📒 Files selected for processing (2)
WalkthroughThe changes expand the public API of the governor module by re-exporting storage functions (getters, setters, and action functions) and update example code to use the Changes
Estimated code review effort🎯 2 (Simple) | ⏱️ ~12 minutes Possibly related PRs
Poem
🚥 Pre-merge checks | ✅ 2 | ❌ 1❌ Failed checks (1 warning)
✅ Passed checks (2 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing Touches
🧪 Generate unit tests (beta)
Tip Try Coding Plans. Let us write the prompt for your AI agent so you can ship faster (with fewer bugs). Comment |
There was a problem hiding this comment.
I'm not against the changes in examples folder.
But I think we shouldn't touch the mod.rs, and fix the rest of the library.
Due to, these are internal functions, so other crates importing them as module::storage::{func1, func2, func3} is not a disadvantage, and signals the message clearer imo.
The downside of the suggested approach in this PR is, if we are exporting these, then why are we using storage::func in the trait name? It is confusing.
We know to reason is to show that the trait implementation should not confuse the people, and clearly show that it is not recursive.
But it looks weird to export the function at crate level, then not using it directly, but with the storage::func path inside that very file
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #605 +/- ##
=======================================
Coverage 96.37% 96.37%
=======================================
Files 58 58
Lines 5960 5960
=======================================
Hits 5744 5744
Misses 216 216 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
The 1st reason I'm against exposing storage is the unnecessary verbosity.
I've agreed with the usage of |
Following the library conventions, this PR re-exports all public functions from governor storage.
Summary by CodeRabbit
Release Notes