Skip to content

Conversation

@Almaju
Copy link
Contributor

@Almaju Almaju commented Jan 28, 2026

Refactor MozAdsClientConfig into MozAdsClientBuilder for better consumer DX especially regarding breaking changes.

Pull Request checklist

  • Breaking changes: This PR follows our breaking change policy
    • This PR follows the breaking change policy:
      • This PR has no breaking API changes, or
      • There are corresponding PRs for our consumer applications that resolve the breaking changes and have been approved
  • Quality: This PR builds and tests run cleanly
    • Note:
      • For changes that need extra cross-platform testing, consider adding [ci full] to the PR title.
      • If this pull request includes a breaking change, consider cutting a new release after merging.
  • Tests: This PR includes thorough tests or an explanation of why it does not
  • Changelog: This PR includes a changelog entry in CHANGELOG.md or an explanation of why it does not need one
    • Any breaking changes to Swift or Kotlin binding APIs are noted explicitly
  • Dependencies: This PR follows our dependency management guidelines
    • Any new dependencies are accompanied by a summary of the due diligence applied in selecting them.

@Almaju Almaju force-pushed the ads-client-builder branch 3 times, most recently from 8350999 to a96ac8f Compare January 29, 2026 22:54
…attern with Arc-based setters

- Restructure MozAdsClientBuilder to use Mutex<Inner> pattern following SuggestStoreBuilder
- Change build() method from consuming self to borrowing &self for uniffi Arc compatibility
- Add fluent setter methods: environment(), cache_config(), telemetry()
- Fix uniffi error where Arc<T> cannot move values out with consuming self
- Add Default impl for MozAdsClientBuilder and clippy allow for new_ret_no_self
- Update usage.md with new builder pattern examples for Swift and Kotlin
- Update integration tests to use new builder.build() pattern
- Remove unused AdsClientConfig import
@Almaju Almaju force-pushed the ads-client-builder branch from a96ac8f to 53df399 Compare January 29, 2026 23:04
@Almaju Almaju marked this pull request as ready for review January 30, 2026 16:09
@Almaju Almaju requested a review from luc-lisi January 30, 2026 17:18
@Almaju Almaju added this pull request to the merge queue Jan 30, 2026
Merged via the queue into mozilla:main with commit 72f76f9 Jan 30, 2026
13 checks passed
@Almaju Almaju deleted the ads-client-builder branch January 30, 2026 20:48
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