refactor: Split mini-moka service to new crate#7020
Merged
Conversation
There was a problem hiding this comment.
Pull request overview
This PR refactors the mini-moka service from an inline module within opendal-core to a standalone crate opendal-service-mini-moka, following the same pattern as other extracted services (moka, s3, gcs, etc.).
- Extracts mini-moka service code from
core/core/src/services/tocore/services/mini_moka/ - Updates all imports to use
opendal_core::*instead of relativecrate::*imports - Creates a new Cargo.toml for the mini-moka service crate with appropriate dependencies
- Updates feature flags and dependencies in the main crate to reference the new service crate
Reviewed changes
Copilot reviewed 13 out of 15 changed files in this pull request and generated no comments.
Show a summary per file
| File | Description |
|---|---|
| core/src/lib.rs | Adds re-export of the new opendal-service-mini-moka crate |
| core/core/src/services/mod.rs | Removes the old inline mini_moka module definition |
| core/core/Cargo.toml | Removes mini-moka dependency and feature from core crate |
| core/Cargo.toml | Updates services-mini-moka feature to depend on new service crate, adds dependency entry, corrects alphabetical ordering of sqlite/sled entries |
| core/Cargo.lock | Reflects dependency changes with new opendal-service-mini-moka entry |
| core/services/mini_moka/Cargo.toml | Creates new package configuration for standalone mini-moka service |
| core/services/mini_moka/src/lib.rs | Updates module-level attributes and replaces crate imports with opendal_core imports |
| core/services/mini_moka/src/backend.rs | Updates imports to use opendal_core instead of relative crate imports |
| core/services/mini_moka/src/config.rs | Updates imports and test code to use explicit opendal_core types |
| core/services/mini_moka/src/core.rs | Updates imports to reference opendal_core |
| core/services/mini_moka/src/deleter.rs | Updates imports to reference opendal_core |
| core/services/mini_moka/src/lister.rs | Updates imports to reference opendal_core |
| core/services/mini_moka/src/writer.rs | Updates imports to reference opendal_core |
| core/services/mini_moka/src/docs.md | Adds new service capabilities documentation |
| core/services/sqlite/Cargo.toml | Removes trailing whitespace |
Comments suppressed due to low confidence (2)
core/services/mini_moka/src/lib.rs:21
- The order of the doc comment and cfg_attr attribute is inconsistent with other service crates. Following the pattern used in other services (moka, fs, gcs, s3, etc.), the cfg_attr should come before the doc comment. The standard pattern is:
#![cfg_attr(docsrs, feature(doc_cfg))]
//! Mini-moka service implementation for Apache OpenDAL.
#![deny(missing_docs)]
core/services/mini_moka/src/lib.rs:22
- The unused_crate_dependencies lint is not used in other similar service crates (e.g., moka, fs, gcs, s3, etc.). Consider removing this line to maintain consistency with the rest of the codebase, unless there's a specific reason for mini-moka to have stricter dependency checks.
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
dbadeca to
73988e0
Compare
73988e0 to
708c3d5
Compare
Xuanwo
approved these changes
Dec 16, 2025
Member
Xuanwo
left a comment
There was a problem hiding this comment.
Thank you for working on this!
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.
Which issue does this PR close?
Part of #6829
Closes #6907
Rationale for this change
What changes are included in this PR?
Are there any user-facing changes?
AI Usage Statement
Zed with GPT-5.1 Codex-Max