Skip to content

Refactor asynchronous serialization and deserialization APIs#324

Merged
vsanthanam merged 1 commit intomainfrom
vsanthanam/async-refactor
Jan 21, 2026
Merged

Refactor asynchronous serialization and deserialization APIs#324
vsanthanam merged 1 commit intomainfrom
vsanthanam/async-refactor

Conversation

@vsanthanam
Copy link
Copy Markdown
Owner

No description provided.

@vsanthanam vsanthanam linked an issue Jan 21, 2026 that may be closed by this pull request
Copy link
Copy Markdown

@chatgpt-codex-connector chatgpt-codex-connector bot left a comment

Choose a reason for hiding this comment

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

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 806cd3e247

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

Comment on lines +175 to +176
let indices = realArray.indices
let last = indices.last.unsafelyUnwrapped
Copy link
Copy Markdown

Choose a reason for hiding this comment

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

P2 Badge Guard empty filtered arrays before unwrapping last index

When SerializationOptions.omitNullValues is set, realArray can be empty even if the original array isn’t (e.g., an array containing only null). In that case realArray.indices.last.unsafelyUnwrapped will trap and crash during serialization; the prior implementation tolerated this and produced []. Consider checking realArray.isEmpty (or avoiding the force unwrap) before taking the last index so arrays that filter to empty still serialize safely.

Useful? React with 👍 / 👎.

@codecov
Copy link
Copy Markdown

codecov bot commented Jan 21, 2026

Codecov Report

❌ Patch coverage is 97.86408% with 11 lines in your changes missing coverage. Please review.
✅ Project coverage is 95.83%. Comparing base (8bd8f14) to head (010e28e).
⚠️ Report is 1 commits behind head on main.

Files with missing lines Patch % Lines
...es/JBirdCore/Deserialization/Deserialization.swift 96.21% 7 Missing ⚠️
...ources/JBirdCore/Serialization/Serialization.swift 98.78% 4 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main     #324      +/-   ##
==========================================
+ Coverage   95.48%   95.83%   +0.34%     
==========================================
  Files          39       40       +1     
  Lines        3303     3434     +131     
==========================================
+ Hits         3154     3291     +137     
+ Misses        149      143       -6     
Flag Coverage Δ
llvm-cov 95.83% <97.86%> (+0.34%) ⬆️
swiftpm 95.83% <97.86%> (+0.34%) ⬆️

Flags with carried forward coverage won't be shown. Click here to find out more.

☔ 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.

@vsanthanam vsanthanam force-pushed the vsanthanam/async-refactor branch from 806cd3e to 347721d Compare January 21, 2026 20:41
@vsanthanam vsanthanam force-pushed the vsanthanam/async-refactor branch from 347721d to 010e28e Compare January 21, 2026 21:32
@vsanthanam vsanthanam merged commit 3d10d41 into main Jan 21, 2026
47 checks passed
@vsanthanam vsanthanam deleted the vsanthanam/async-refactor branch January 21, 2026 22:08
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.

Refactor Async Parsing APIs

1 participant