Skip to content

Conversation

@Xuanwo
Copy link
Member

@Xuanwo Xuanwo commented May 22, 2025

Which issue does this PR close?

Closes #5727

Rationale for this change

Propose a new API to make our users lives easier.

What changes are included in this PR?

A new RFC.

Are there any user-facing changes?

None

Signed-off-by: Xuanwo <[email protected]>
@dosubot dosubot bot added size:L This PR changes 100-499 lines, ignoring generated files. releases-note/feat The PR implements a new feature or has a title that begins with "feat" labels May 22, 2025
@Xuanwo Xuanwo changed the title RFC: Options API RFC-6213: Options API May 22, 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 proposes an RFC to introduce an options-based API for OpenDAL operations to improve code readability and maintainability.

  • Introduces a new RFC document outlining the options API design.
  • Provides code examples contrasting the traditional builder pattern with the proposed structured options approach.
Comments suppressed due to low confidence (2)

core/src/docs/rfcs/0000_options_api.md:91

  • The 'version' field is used in the ReadOptions initialization but is not declared in the ReadOptions struct. Consider either adding the 'version' field to the struct or removing its usage from this example.
    version: Some(version_id),

core/src/docs/rfcs/0000_options_api.md:92

  • The code uses ReadOptions::default(), which implies that a default implementation exists for ReadOptions; however, such an implementation is not shown in the struct definition. Please include a default implementation or adjust the example accordingly.
    ...ReadOptions::default(),

Signed-off-by: Xuanwo <[email protected]>
Copy link
Contributor

@jorgehermo9 jorgehermo9 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I like this a lot!

Copy link
Contributor

@yihong0618 yihong0618 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

releases-note/feat The PR implements a new feature or has a title that begins with "feat" size:L This PR changes 100-499 lines, ignoring generated files.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Add new API like write_opt to allow users to pass an OpWrite directly

4 participants