Skip to content

Enable codable on swift bindings#1096

Merged
quexten merged 1 commit into
mainfrom
km/codable-conformance
May 18, 2026
Merged

Enable codable on swift bindings#1096
quexten merged 1 commit into
mainfrom
km/codable-conformance

Conversation

@quexten
Copy link
Copy Markdown
Contributor

@quexten quexten commented May 18, 2026

🎟️ Tracking

bitwarden/ios#2648 (comment)

📔 Objective

As per mobile's request, we are enabling codable for the uniffi bindings so that they can directly serialize the structs they get returned from the SDK without having to maintain a seprate copy. Maintaining a separate copy in the past has lead to bugs / incorrect state being saved (bitwarden/ios#2303).

This is safer than mobiles current approach of persisting server request / response models, which do not match what the SDK returns.

🚨 Breaking Changes

@sonarqubecloud
Copy link
Copy Markdown

@github-actions
Copy link
Copy Markdown
Contributor

github-actions Bot commented May 18, 2026

🔍 SDK Breaking Change Detection

SDK Version: km/codable-conformance (1def388)

⚠️ If breaking changes are detected, a corresponding pull request addressing them must be ready for merge in the affected client repository.

Client Status Details
typescript ✅ No breaking changes detected Compilation passed with new SDK version - View Details
android ✅ No breaking changes detected Compilation passed with new SDK version - View Details

Breaking change detection uses the build of the SDK from this branch, including any incompatibities pre-existing on or merged into this branch. Check the workflow logs to confirm.
Results update as workflows complete.

@codecov
Copy link
Copy Markdown

codecov Bot commented May 18, 2026

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 83.83%. Comparing base (e13c4fc) to head (1def388).
⚠️ Report is 1 commits behind head on main.

Additional details and impacted files
@@            Coverage Diff             @@
##             main    #1096      +/-   ##
==========================================
+ Coverage   83.76%   83.83%   +0.06%     
==========================================
  Files         432      433       +1     
  Lines       54750    54958     +208     
==========================================
+ Hits        45862    46072     +210     
+ Misses       8888     8886       -2     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

@quexten quexten marked this pull request as ready for review May 18, 2026 08:09
@quexten quexten requested a review from a team as a code owner May 18, 2026 08:09
@quexten quexten requested a review from djsmith85 May 18, 2026 08:09
@quexten quexten merged commit 0b29247 into main May 18, 2026
61 checks passed
@quexten quexten deleted the km/codable-conformance branch May 18, 2026 11:05
@dani-garcia
Copy link
Copy Markdown
Member

Is this something we could also enable for all other crates too? Seems pretty safe to add in general and it seems like it could also be beneficial for ios devs as they integrate the SDK more. Plus it might be a bit strange that some SDK items implement codable but others don't.

@quexten
Copy link
Copy Markdown
Contributor Author

quexten commented May 18, 2026

@dani-garcia Sure, I think that makes sense. I just did the minimum amount of change to get KM's structs covered, and did not investigate the user-cases / appropriateness on other crates.

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.

3 participants