Remove prelude modules and wildcard imports#28
Merged
Conversation
Contributor
There was a problem hiding this comment.
Pull request overview
This PR systematically removes prelude modules across all crates in the workspace and replaces wildcard imports with explicit imports, improving code clarity and making dependencies more transparent.
Changes:
- Removed prelude modules from
foundation,render-pdf,render-typst,core-invoice, andclicrates - Replaced all
use crate::prelude::*imports with explicit named imports - Updated documentation examples to use
use klirr_core_invoice::*instead ofuse klirr_core_invoice::prelude::*
Reviewed changes
Copilot reviewed 144 out of 145 changed files in this pull request and generated no comments.
Show a summary per file
| File | Description |
|---|---|
| crates/foundation/src/lib.rs | Removed prelude module; exports specific items from models and traits |
| crates/foundation/src/traits/mod.rs | Changed from wildcard re-exports to explicit named exports |
| crates/foundation/src/models/mod.rs | Changed from wildcard re-exports to explicit named exports |
| crates/render-pdf/src/lib.rs | Removed prelude module; re-exports specific items from klirr_foundation and internal modules |
| crates/render-typst/src/lib.rs | Removed prelude module; simplified to direct re-export from render module |
| crates/core-invoice/src/lib.rs | Removed prelude module; re-exports all items from logic and models, plus std types |
| crates/cli/src/main.rs | Removed prelude module usage; explicit imports from all dependencies |
| crates/cli/Cargo.toml | Added explicit dependencies on getset and indexmap that were previously transitively available |
| Multiple model files | Replaced use crate::prelude::* with explicit imports of needed types and traits |
| Multiple test modules | Added explicit imports for test dependencies like HasSample, FromStr, dec! |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #28 +/- ##
=======================================
Coverage 94.50% 94.50%
=======================================
Files 100 100
Lines 2202 2202
=======================================
Hits 2081 2081
Misses 121 121 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
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.
Remove
preludemodules and wildcard "imports" in favour of explicit use statements.