Skip to content

Comments

refactor: Split mini-moka service to new crate#7020

Merged
Xuanwo merged 1 commit intomainfrom
extract-mini-moka-service
Dec 16, 2025
Merged

refactor: Split mini-moka service to new crate#7020
Xuanwo merged 1 commit intomainfrom
extract-mini-moka-service

Conversation

@koushiro
Copy link
Member

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

Copilot AI review requested due to automatic review settings December 16, 2025 04:31
@koushiro koushiro requested a review from Xuanwo as a code owner December 16, 2025 04:31
@dosubot dosubot bot added size:L This PR changes 100-499 lines, ignoring generated files. releases-note/refactor The PR does a refactor on code or has a title that begins with "refactor" labels Dec 16, 2025
Copy link

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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/ to core/services/mini_moka/
  • Updates all imports to use opendal_core::* instead of relative crate::* 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.

@koushiro koushiro force-pushed the extract-mini-moka-service branch from dbadeca to 73988e0 Compare December 16, 2025 06:12
@koushiro koushiro force-pushed the extract-mini-moka-service branch from 73988e0 to 708c3d5 Compare December 16, 2025 06:42
Copy link
Member

@Xuanwo Xuanwo left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thank you for working on this!

@dosubot dosubot bot added the lgtm This PR has been approved by a maintainer label Dec 16, 2025
@Xuanwo Xuanwo merged commit 28656c3 into main Dec 16, 2025
392 checks passed
@Xuanwo Xuanwo deleted the extract-mini-moka-service branch December 16, 2025 07:48
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

lgtm This PR has been approved by a maintainer releases-note/refactor The PR does a refactor on code or has a title that begins with "refactor" size:L This PR changes 100-499 lines, ignoring generated files.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[core split] Service: mini-moka

2 participants