Skip to content

Conversation

@Sushisource
Copy link
Member

What was changed

Why?

Checklist

  1. Closes

  2. How was this tested:

  1. Any docs updates needed?

#[derive(Clone, bon::Builder)]
#[builder(on(String, into), state_mod(vis = "pub"), finish_fn(vis = "", name = build_internal))]
#[non_exhaustive]
pub struct WorkerConfig {
Copy link
Member Author

Choose a reason for hiding this comment

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

My biggest annoyance with this PR is that bon makes building partially-fulfilled builders somewhat difficult. It's better in every other respect than derive_builder, but this limitation makes the test code slightly worse.

You will note there are many places now where, previously, we updated the builder inside a CoreWfStarter for example, but now we have to directly mutate fields on the built WorkerConfig. This is not ideal because it bypasses validation.

However, I'm not hugely concerned about that since, ultimately, this struct probably doesn't need to become public and the Rust SDK can export its own (nearly identical) version, where we will make the fields private and add getters.

@Sushisource Sushisource marked this pull request as ready for review December 5, 2025 23:41
@Sushisource Sushisource requested a review from a team as a code owner December 5, 2025 23:41
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants