refactor: Split tail-cut layer to new crate#6968
Conversation
There was a problem hiding this comment.
Pull request overview
This PR refactors the tail-cut layer from the core crate into a separate opendal-layer-tail-cut crate, following the same pattern used for other layers like prometheus, metrics, and async-backtrace. This separation improves modularity and allows the layer to be optionally included via a feature flag.
Key Changes:
- Extracted tail-cut layer implementation to a new crate at
core/layers/tail-cut/ - Updated imports to reference
opendal_coreinstead of internalcratepaths - Added feature flag
layers-tail-cutfor conditional compilation
Reviewed changes
Copilot reviewed 5 out of 6 changed files in this pull request and generated no comments.
Show a summary per file
| File | Description |
|---|---|
| core/src/lib.rs | Added re-export of opendal_layer_tail_cut under the layers module with feature gate |
| core/layers/tail-cut/src/lib.rs | Updated imports from crate::* to opendal_core::* and reformatted documentation examples |
| core/layers/tail-cut/Cargo.toml | Created new crate manifest with dependencies on opendal-core and tokio |
| core/core/src/layers/mod.rs | Removed old tail_cut module declaration and exports |
| core/Cargo.toml | Added layers-tail-cut feature and opendal-layer-tail-cut dependency |
| core/Cargo.lock | Updated dependency graph with new opendal-layer-tail-cut crate |
Comments suppressed due to low confidence (1)
core/layers/tail-cut/src/lib.rs:24
- Missing import for
std::time::Duration. The code usesDurationextensively throughout the file (in struct fields at lines 57, 59, 60, function parameters at lines 129, 155, 166, etc.), but there's no import statement for it. Adduse std::time::Duration;to the imports.
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
Xuanwo
left a comment
There was a problem hiding this comment.
Thank you for working on this!
|
Hi, just curious, are you using a code agent for this PR? If so, are you using the prompts I provided in the tracking issue? Which tool and LLM are you using? |
Yeah, I'm using GPT 5.1 codex and the prompts |
Which issue does this PR close?
part of #6829
Closes #6948
Rationale for this change
What changes are included in this PR?
Are there any user-facing changes?