refactor: Split memcached service to new crate#7023
Merged
Conversation
There was a problem hiding this comment.
Pull request overview
This PR successfully refactors the memcached service implementation by extracting it from the monolithic opendal-core crate into a separate opendal-service-memcached crate, following the pattern established by other recently extracted services (e.g., moka, sqlite, ipfs).
Key Changes
- Created new
opendal-service-memcachedcrate with its own Cargo.toml - Updated all import paths from
crate::*toopendal_core::*throughout memcached source files - Removed memcached service module from
opendal-coreand updated feature flags - Added memcached as an external dependency in the facade crate's service re-exports
Reviewed changes
Copilot reviewed 14 out of 15 changed files in this pull request and generated no comments.
Show a summary per file
| File | Description |
|---|---|
| core/services/memcached/Cargo.toml | New package definition for the standalone memcached service crate |
| core/services/memcached/src/lib.rs | Updated module-level documentation and registry reference to use opendal_core::DEFAULT_OPERATOR_REGISTRY |
| core/services/memcached/src/*.rs | Refactored imports from internal crate::* paths to external opendal_core::* paths |
| core/services/memcached/src/docs.md | Updated documentation example to use new import paths |
| core/services/memcached/src/config.rs | Updated test to properly propagate Result type with ? operator |
| core/core/src/services/mod.rs | Removed memcached module declaration (now external crate) |
| core/core/Cargo.toml | Removed services-memcached feature flag definition (fastpool still used by etcd, redis, sftp) |
| core/Cargo.toml | Updated feature flag to use external crate dependency and fixed alphabetical ordering of service dependencies |
| core/src/lib.rs | Added re-export of opendal_service_memcached in services module |
| core/Cargo.lock | Added dependency entry for new opendal-service-memcached crate |
| core/services/sqlite/Cargo.toml | Removed trailing empty line (unrelated cleanup) |
Comments suppressed due to low confidence (2)
core/services/memcached/src/lib.rs:21
- The crate-level doc comment should come after the
#![cfg_attr(docsrs, feature(doc_cfg))]attribute, not before it. This follows the convention used in other service crates likemokaandipfswhere attributes precede the module-level documentation comment.
core/services/memcached/src/docs.md:31 - The documentation example should use
use anyhow::Result;instead ofuse opendal_core::Result;to be consistent with all other service crates (aliyun-drive, alluxio, azblob, azdls, azfile, fs, ftp, gcs, ghac, moka, mysql, obs, oss, postgresql, s3, sled, sqlite, tikv, vercel-blob).
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
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 #6906
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