Repository navigation
fix(swift): take container init bytes as Data - #5628
Conversation
Codex Review SummaryThis comment shows the latest Codex review activity on this pull request.
ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings. |
|
Warning Review limit reachedYou've used all free OSS reviews for now. Wait for the free limit to reset to keep reviewing this public repository. Next included review available in 16 minutes. View limit details
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
kixelated
left a comment
There was a problem hiding this comment.
Automated review by review (OpenAI)
Reviewed commit: 9309e06.
No actionable bugs found. Both ContainerInit byte declarations now match the generated initializer's Data argument, as confirmed by the earlier macOS compiler diagnostic. Foundation is already imported; the existing data: [] test call remains compatible. This narrowly restores the byte type used before the wrapper replaced the typealias, without adding an unnecessary conversion or changing the wire format.
Verification: inspected Swift source/call sites and the existing failing macOS log (run 38824054798, job 116727301509). No tests or post-fix macOS build run by me; the head's Platform workflow was skipped.
Problem
mainfails the macOS Swift build since #5559:Media.swift:71:76: cannot convert value of type '[UInt8]' to expected argument type 'Data'(merge-queue Platform run 38824054798).UniFFI maps
Vec<u8>toData, but the newMedia.ContainerInitwrapper stored its bytes as[UInt8].The Swift build only runs on macOS, so Linux CI never compiled it.
Approach
Make
ContainerInit.dataand its initializer takeData.This matches
VideoInit,AudioFrame, and frame writes, and restores the typeContainerInithad as aMoqContainerInittypealias before #5559.The existing
data: []test literal still compiles, sinceDatais array-literal expressible.Impact
Media.ContainerInit.dataandinit(format:data:timebase:)takeDatainstead of[UInt8]. Unreleased since feat(ffi): share container source timebases #5559; same type as the previous release.Alternatives
Data(data)): keeps[UInt8]in the public API, inconsistent with every other byte field in the Swift wrapper, for an extra copy.Follow-ups
None. The other bindings #5559 touched (Go
[]byte, Pythonbytes, Kotlin/Dart/C++ aliases) match their generated types and are built on Linux CI.(Written by Opus 5.5)
🤖 Generated with Claude Code