alamb opened a new issue, #835:
URL: https://github.com/apache/arrow-rs-object-store/issues/835

   **Which part is this question about**
   `ClientOptions` / the new `DnsResolver` API added in #728
   
   **Describe the regression**
   
   #728 added an `Option<Arc<dyn DnsResolver>>` field to `ClientOptions`. 
Because the `DnsResolver` trait is only bound by `Debug + Send + Sync`, the 
trait object does not implement the `UnwindSafe` / `RefUnwindSafe` auto traits, 
and `ClientOptions` (and any type embedding it, such as the store builders) 
loses those impls as well.
   
   `cargo semver-checks --baseline-rev v0.14.1 --all-features` reports:
   
   ```
   --- failure auto_trait_impl_removed: auto trait no longer implemented ---
   
   Failed in:
     type ClientOptions is no longer UnwindSafe, in src/client/mod.rs:343
     type ClientOptions is no longer RefUnwindSafe, in src/client/mod.rs:343
   
   Summary semver requires new major version: 1 major and 0 minor checks failed
   ```
   
   Downstream code that passes `ClientOptions` across 
`std::panic::catch_unwind` or otherwise relies on these bounds would stop 
compiling.
   
   **Proposed fix**
   
   Add `UnwindSafe + RefUnwindSafe` as supertraits of `DnsResolver`:
   
   ```rust
   pub trait DnsResolver: Debug + Send + Sync + UnwindSafe + RefUnwindSafe {
   ```
   
   This restores the auto traits on `ClientOptions` (verified: all 196 semver 
checks pass against v0.14.1). The cost is a slightly stricter requirement on 
resolver implementations, but since #728 is unreleased this can still be 
changed without breaking anyone.
   
   **Additional context**
   
   Found while auditing the changes on `main` since `v0.14.1` for breaking API 
changes; the other commits since the release are doc-only.


-- 
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