Skip to content

Comments

refactor: Split mime-guess layer to new crate#6966

Merged
Xuanwo merged 1 commit intomainfrom
extract-mime-guess-layer
Dec 11, 2025
Merged

refactor: Split mime-guess layer to new crate#6966
Xuanwo merged 1 commit intomainfrom
extract-mime-guess-layer

Conversation

@koushiro
Copy link
Member

@koushiro koushiro commented Dec 11, 2025

Which issue does this PR close?

part of #6829

Closes #6941

Rationale for this change

What changes are included in this PR?

Are there any user-facing changes?

@koushiro koushiro requested a review from Xuanwo as a code owner December 11, 2025 05:39
Copilot AI review requested due to automatic review settings December 11, 2025 05:39
@dosubot dosubot bot added size:M This PR changes 30-99 lines, ignoring generated files. releases-note/refactor The PR does a refactor on code or has a title that begins with "refactor" labels Dec 11, 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 mime-guess layer from the core crate into a new separate crate opendal-layer-mime-guess, following the same pattern used for other layers like metrics and prometheus. This modularization improves code organization and allows the mime-guess layer to be used as an independent dependency.

Key Changes:

  • Extracted mime-guess layer implementation into a new crate at core/layers/mime-guess/
  • Updated imports from crate:: to opendal_core:: throughout the layer code
  • Modified the main crate to re-export the new opendal-layer-mime-guess crate

Reviewed changes

Copilot reviewed 6 out of 7 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 the new opendal-layer-mime-guess crate in the layers module
core/layers/mime-guess/src/lib.rs Updated imports to use opendal_core namespace and fixed documentation URL to point to external docs.rs link
core/layers/mime-guess/Cargo.toml Created new Cargo manifest for the standalone mime-guess layer crate with proper dependencies
core/core/src/layers/mod.rs Removed the inline mime_guess module definition from the core crate
core/core/Cargo.toml Removed the layers-mime-guess feature flag and mime_guess dependency from core
core/Cargo.toml Added opendal-layer-mime-guess as a new optional dependency and updated the feature flag to reference it
core/Cargo.lock Updated dependency graph to reflect the new crate structure

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

@koushiro koushiro force-pushed the extract-mime-guess-layer branch from d28f7d8 to 90a4400 Compare December 11, 2025 06:06
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 11, 2025
@Xuanwo Xuanwo merged commit 76c626d into main Dec 11, 2025
390 checks passed
@Xuanwo Xuanwo deleted the extract-mime-guess-layer branch December 11, 2025 07:38
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:M This PR changes 30-99 lines, ignoring generated files.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[core split] Layer: mime_guess

2 participants