Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat(core)!: Make config data object #4915

Merged
merged 12 commits into from
Jul 20, 2024
Merged

feat(core)!: Make config data object #4915

merged 12 commits into from
Jul 20, 2024

Conversation

tisonkun
Copy link
Member

@tisonkun tisonkun commented Jul 20, 2024

Which issue does this PR close?

This closes #3240.

What changes are included in this PR?

See commits message.

Are there any user-facing changes?

All builder has an associated config data object type now.

Signed-off-by: tison <wander4096@gmail.com>
Signed-off-by: tison <wander4096@gmail.com>
Signed-off-by: tison <wander4096@gmail.com>
Signed-off-by: tison <wander4096@gmail.com>
Signed-off-by: tison <wander4096@gmail.com>
Signed-off-by: tison <wander4096@gmail.com>
Signed-off-by: tison <wander4096@gmail.com>
Signed-off-by: tison <wander4096@gmail.com>
Signed-off-by: tison <wander4096@gmail.com>
Signed-off-by: tison <wander4096@gmail.com>
@tisonkun tisonkun requested a review from Xuanwo as a code owner July 20, 2024 00:38
@tisonkun tisonkun changed the title Make config data object feat: Make config data object Jul 20, 2024
Signed-off-by: tison <wander4096@gmail.com>
@tisonkun

This comment was marked as resolved.

@tisonkun

This comment was marked as resolved.

@tisonkun

This comment was marked as resolved.

@tisonkun tisonkun requested a review from PsiACE as a code owner July 20, 2024 01:20
Signed-off-by: tison <wander4096@gmail.com>
@tisonkun

This comment was marked as resolved.

type Config: DeserializeOwned;

/// Construct a builder from given config.
fn from_config(config: Self::Config) -> Self;
Copy link
Member

@Xuanwo Xuanwo Jul 20, 2024

Choose a reason for hiding this comment

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

I want to return Result<Self> in from_config and from_map to avoid panic during the build process. Would you like to help implementing it in this PR or start a new PR for this? Or I can continue the work after this PR.

Copy link
Member Author

Choose a reason for hiding this comment

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

Let's make further non-blocker change in a follow-up PR. I can do it, but not in this one unless it's necessary.

@Xuanwo Xuanwo changed the title feat: Make config data object feat(core)!: Make config data object Jul 20, 2024
@tisonkun
Copy link
Member Author

@Xuanwo Actually this is not a breaking change .. What parts are breaking?

@Xuanwo
Copy link
Member

Xuanwo commented Jul 20, 2024

@Xuanwo Actually this is not a breaking change .. What parts are breaking?

Builder is a public trait. All users implement this API will fail to compile.

Adding a new associated type and required function are breaking changes.

@tisonkun tisonkun requested a review from Xuanwo July 20, 2024 04:52
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.

Thanks a lot for finishing this!

@tisonkun tisonkun merged commit aa6781a into main Jul 20, 2024
255 checks passed
@tisonkun tisonkun deleted the make-config-data-object branch July 20, 2024 04:55
@tisonkun tisonkun mentioned this pull request Jul 20, 2024
47 tasks
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Tracking issues of RFC-3197: Config
2 participants