Xuanwo opened a new pull request, #8861:
URL: https://github.com/apache/opendal/pull/8861

   # Which issue does this PR close?
   
   Part of #8850
   
   # Rationale for this change
   
   Issue #8850 tracks leftover scaffolding inside the layer crates: a private 
`fn layer(&self, inner: Servicer)` helper that only forwards to 
`Layer::apply_service`, and internal wrapper structs marked `#[doc(hidden)] 
pub` even though nothing outside the defining crate uses them.
   
   The trampoline adds an indirection between the trait hook and the 
constructor, and the `pub` visibility of the wrappers advertises an export that 
does not exist. This PR is one conflict-free batch of that cleanup, matching 
the form already used by e.g. `core/layers/hedge`, and the form introduced by 
the sibling PRs (#8859, #8819, #8826, #8851, #8856).
   
   This batch touches only `capability-check`, `chaos`, `immutable-index`, 
`logging`, `oteltrace`, `tail-cut`, and `tracing`, which no other open PR or 
issue touches. `async-backtrace`, `await-tree`, `fastrace`, `hotpath`, 
`mime-guess`, `observe-metrics-common`, `route`, `throttle` (#8859), `foyer` 
(#8819), `retry` (#8826), `concurrent-limit` (#8851), `dtrace` (#8856), and 
`core/core/src/layers/` (`simulate.rs` #8824, `correctness_check.rs` #8852) are 
out of scope here.
   
   # What changes are included in this PR?
   
   For each of the seven layer crates:
   
   - `Layer::apply_service` now constructs the wrapper service directly, and 
the private `fn layer(&self, inner: Servicer)` trampoline is deleted. Layers 
that computed setup values before construction (`logging` captures 
`inner.info()`) keep that work at the call site.
   - Internal `*Service` and I/O wrapper types (`CapabilityCheckService`, 
`ChaosService`, `ChaosReader`, `ImmutableIndexService`, `ImmutableDir`, 
`LoggingService`, `LoggingReader`, `LoggingWriter`, `LoggingLister`, 
`LoggingDeleter`, `LoggingCopier`, `LoggingComposer`, `OtelTraceService`, 
`OtelTraceWrapper`, `TailCutService`, `TailCutWrapper`, `TracingService`, 
`TracingWrapper`) are now private instead of `#[doc(hidden)] pub`. Their 
`#[doc(hidden)]` attributes are dropped because they no longer apply.
   - Two crate-internal tests that drove a service through the removed 
trampoline now call `Layer::apply_service`, which is the same entry point the 
operator uses.
   
   Every privatized type was checked with `rg` over `core/`, `bindings/`, 
`integrations/`, and `examples/`; each one is referenced only from its own 
crate. The user-facing layer types (`*Layer`, `LoggingInterceptor`, 
`DefaultLoggingInterceptor`, `TailCutLayerBuilder`) are untouched.
   
   # Are there any user-facing changes?
   
   No. The layers keep their public configuration surface and behavior. The 
only removed items were `#[doc(hidden)] pub` wrappers that the crates never 
exported as API, and a private function.
   
   # Breaking changes
   
   None.
   
   # AI Usage Statement
   
   - Harness: pi (T3 Code)
   - Model: DeepSeek (`group/deepseek` via the magpie provider)
   - Effort: high
   - Role: AI researched the affected crates with repository-wide `rg`, made 
the edits, ran the local build/lint/test/doc verification, and drafted this 
description. The accountable human contributor remains responsible for the 
change and every claim above.
   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to