You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@opendal.apache.org by "Xuanwo (via GitHub)" <gi...@apache.org> on 2025/03/10 13:24:31 UTC

[I] Add new API like `write_opt` to allow users to pass an `OpWrite` directly [opendal]

Xuanwo opened a new issue, #5727:
URL: https://github.com/apache/opendal/issues/5727

   
   ### Discussed in https://github.com/apache/opendal/discussions/5674
   
   <div type='discussions-op-text'>
   
   <sup>Originally posted by **Xuanwo** March  1, 2025</sup>
   Hello, everyone,
   
   While reviewing a PR like [this one](https://github.com/apache/opendal/pull/5664/), I noticed a common pattern where users struggle to work with our `write_with` API. This API is designed for more advanced Rust users, but it can be quite difficult to use when users try to wrap it.
   
   So, I'm wondering if it would be a good idea to expose `OpXxx` directly, allowing users to use them more straightforwardly, like this:
   
   ```rust
   let opt = OpWrite::default();
   let _ = op.write_opt(path, data, opt).await?;
   ```
   
   Following the same pattern, we could introduce `read_opt`, `list_opt`, and more.
   
   What do you think?</div>


-- 
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: commits-unsubscribe@opendal.apache.org.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [I] Add new API like `write_opt` to allow users to pass an `OpWrite` directly [opendal]

Posted by "Xuanwo (via GitHub)" <gi...@apache.org>.
Xuanwo commented on issue #5727:
URL: https://github.com/apache/opendal/issues/5727#issuecomment-2900755504

   Hello everyone here @yihong0618 @yuchanns @sunheyi6 @xyjixyjixyji  , I have started a new RFC https://github.com/apache/opendal/pull/6213 for this. Welcome to take a look!


-- 
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: commits-unsubscribe@opendal.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [I] Add new API like `write_opt` to allow users to pass an `OpWrite` directly [opendal]

Posted by "xyjixyjixyji (via GitHub)" <gi...@apache.org>.
xyjixyjixyji commented on issue #5727:
URL: https://github.com/apache/opendal/issues/5727#issuecomment-2808552601

   +1, this could be a good way of unifing the APIs for IOs. But we need to make this API to have max compatibility so future changes will not break the usage of this.


-- 
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: commits-unsubscribe@opendal.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [I] Add new API like `write_opt` to allow users to pass an `OpWrite` directly [opendal]

Posted by "sunheyi6 (via GitHub)" <gi...@apache.org>.
sunheyi6 commented on issue #5727:
URL: https://github.com/apache/opendal/issues/5727#issuecomment-2826628751

   +1


-- 
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: commits-unsubscribe@opendal.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [I] Add new API like `write_opt` to allow users to pass an `OpWrite` directly [opendal]

Posted by "yihong0618 (via GitHub)" <gi...@apache.org>.
yihong0618 commented on issue #5727:
URL: https://github.com/apache/opendal/issues/5727#issuecomment-2808648243

   +1


-- 
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: commits-unsubscribe@opendal.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [I] Add new API like `write_opt` to allow users to pass an `OpWrite` directly [opendal]

Posted by "Xuanwo (via GitHub)" <gi...@apache.org>.
Xuanwo closed issue #5727: Add new API like `write_opt` to allow users to pass an `OpWrite` directly
URL: https://github.com/apache/opendal/issues/5727


-- 
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: commits-unsubscribe@opendal.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [I] Add new API like `write_opt` to allow users to pass an `OpWrite` directly [opendal]

Posted by "yuchanns (via GitHub)" <gi...@apache.org>.
yuchanns commented on issue #5727:
URL: https://github.com/apache/opendal/issues/5727#issuecomment-2804886316

   Vote +1. I need this for C and Go bindings


-- 
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: commits-unsubscribe@opendal.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [I] Add new API like `write_opt` to allow users to pass an `OpWrite` directly [opendal]

Posted by "Xuanwo (via GitHub)" <gi...@apache.org>.
Xuanwo commented on issue #5727:
URL: https://github.com/apache/opendal/issues/5727#issuecomment-2710595614

   The remaining point to discuss is that `OpXxx` is currently in `opendal::raw`. If we want to expose it in the API, such as through `write_opt`, we first need to make it publicly available.


-- 
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: commits-unsubscribe@opendal.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org