Skip to content

Fix releasing Dart iOS package - #3680

Merged
csukuangfj merged 2 commits into
k2-fsa:masterfrom
csukuangfj:fix-ios-flutter
Jun 15, 2026
Merged

csukuangfj merged 2 commits into
k2-fsa:masterfrom
csukuangfj:fix-ios-flutter

Conversation

@csukuangfj

@csukuangfj csukuangfj commented Jun 15, 2026 •

Copy link
Copy Markdown
Collaborator

Summary by CodeRabbit

  • Chores
    • Optimized iOS build artifacts by removing debug symbols from the sherpa_onnx binary in both arm64 and simulator builds.

@dosubot dosubot Bot added the size:XS This PR changes 0-9 lines, ignoring generated files. label Jun 15, 2026
@coderabbitai

coderabbitai Bot commented Jun 15, 2026 •

Copy link
Copy Markdown

Review Change Stack

Caution

Review failed

The pull request is closed.

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Pro

Run ID: 072424a0-a345-4df8-a4df-f72e25cc87e8

📥 Commits

Reviewing files that changed from the base of the PR and between 330609d and 54ab410.

📒 Files selected for processing (2)
  • build-ios-shared.sh
  • sherpa-onnx/csrc/offline-catt-model.cc

📝 Walkthrough

Walkthrough

Two unrelated fixes: build-ios-shared.sh gains strip -x sherpa_onnx after chmod +x in both the ios-arm64 and ios-arm64_x86_64-simulator framework build blocks; and in offline-catt-model.cc, the const qualifier is removed from the private OfflineCATTModel::Impl::Allocator() method.

Changes

iOS Framework Symbol Stripping

Layer / File(s) Summary
strip -x added to both iOS framework targets
build-ios-shared.sh
strip -x sherpa_onnx is inserted immediately after chmod +x in the ios-arm64 build block (line 194) and the ios-arm64_x86_64-simulator build block (line 218).

CATT Model Allocator const Removal

Layer / File(s) Summary
Allocator() method loses const qualifier
sherpa-onnx/csrc/offline-catt-model.cc
The Allocator() accessor in the private nested OfflineCATTModel::Impl class changes from OrtAllocator *Allocator() const to OrtAllocator *Allocator().

Estimated code review effort

🎯 1 (Trivial) | ⏱️ ~3 minutes

Poem

🐇 A strip here, a strip there,
Debug symbols gone without a care!
And const removed with quiet grace,
The allocator freed to its rightful place.
Hop hop—small fixes win the race! 🎉

✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests

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.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

@csukuangfj
csukuangfj merged commit 6206c9c into k2-fsa:master Jun 15, 2026
6 of 27 checks passed
@csukuangfj
csukuangfj deleted the fix-ios-flutter branch June 15, 2026 09:17

@gemini-code-assist gemini-code-assist Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Code Review

This pull request adds symbol stripping (strip -x) to the iOS shared library build script and removes the const qualifier from the Allocator() method in OfflineCATTModel::Impl. Feedback suggests maintaining const-correctness for Allocator() by marking the allocator_ member variable as mutable instead of removing the const qualifier.

Important

The consumer version of Gemini Code Assist on GitHub is being sunset. Starting June 18, 2026, new organization installations will be blocked, and all code review activity will officially cease on July 17, 2026.
For more details on the timeline and next steps, please review the Help Documentation.

}

OrtAllocator *Allocator() const { return allocator_; }
OrtAllocator *Allocator() { return allocator_; }

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

medium

To preserve the const-correctness of the Impl::Allocator() method, you can mark the allocator_ member variable as mutable (at line 118). This allows you to keep Allocator() const as const without compilation errors, maintaining consistency with OfflineCATTModel::Allocator() const.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

size:XS This PR changes 0-9 lines, ignoring generated files.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant