Skip to content

chore(sdk): mark remaining Options types as non_exhaustive - #1450

Merged
chris-olszewski merged 20 commits into
mainfrom
olszewski/non_exhaustive
Aug 5, 2026
Merged

chore(sdk): mark remaining Options types as non_exhaustive#1450
chris-olszewski merged 20 commits into
mainfrom
olszewski/non_exhaustive

Conversation

@chris-olszewski

@chris-olszewski chris-olszewski commented Aug 4, 2026

Copy link
Copy Markdown
Member

What was changed

Go through remaining public Options structs and ensure they all:

  • are marked with #[non_exhaustive]
  • use bon to provide a builder
  • adding PartialEq implementations where applicable

Each commit is reviewable on its own.

Why?

Without the non_exhaustive attribute, any expansion to these options would be a breaking change.

Checklist

  1. Closes N/A

  2. How was this tested:
    👀, did add unit tests that T::default() == T::builder().build() to ensure those don't diverge.

  3. Any docs updates needed?
    N/A

@chris-olszewski
chris-olszewski force-pushed the olszewski/non_exhaustive branch from 89d9281 to b7bbd59 Compare August 5, 2026 13:08
@chris-olszewski
chris-olszewski force-pushed the olszewski/non_exhaustive branch from c8836e2 to bfc4876 Compare August 5, 2026 13:48
}

/// Options for Nexus Operations
#[derive(Default, Debug, Clone)]

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

Removing Default here as I think that was compensating for the lack of builder. There isn't really a valid "default" here since empty endpoint/service/operation isn't sensible.

@chris-olszewski
chris-olszewski marked this pull request as ready for review August 5, 2026 13:50
@chris-olszewski
chris-olszewski requested a review from a team as a code owner August 5, 2026 13:50

@Sushisource Sushisource left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Nice!

Comment thread crates/client/src/options_structs.rs Outdated
Comment thread crates/client/src/retry.rs
Comment thread crates/common/src/envconfig.rs Outdated
@chris-olszewski
chris-olszewski merged commit 5de5681 into main Aug 5, 2026
21 checks passed
@chris-olszewski
chris-olszewski deleted the olszewski/non_exhaustive branch August 5, 2026 17:56
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