Skip to content

fix(build): pack phonemis submodule sources in npm tarball#1182

Merged
msluszniak merged 1 commit into
mainfrom
@ms/phonemis-submodule-pack
May 25, 2026
Merged

fix(build): pack phonemis submodule sources in npm tarball#1182
msluszniak merged 1 commit into
mainfrom
@ms/phonemis-submodule-pack

Conversation

@msluszniak
Copy link
Copy Markdown
Member

Description

Init the phonemis git submodule in create-package.sh so its sources are present in the published npm tarball. Previously the submodule was empty at pack time, so the podspec's third-party/common/phonemis/src/**/*.{cpp,hpp,h} source-files glob found nothing and TTS-using apps could not build from the npm package.

data/, scripts/, test/, and requirements.txt are trimmed in the script (working-tree trim, restored on exit via trap) rather than via the package.json files field, because the submodule's own .gitignore re-includes scripts/build* via !scripts/build* and npm-packlist honors that rule against files exclusions.

Introduces a breaking change?

  • Yes
  • No

Type of change

  • Bug fix (change which fixes an issue)
  • New feature (change which adds functionality)
  • Documentation update (improves or adds clarity to existing documentation)
  • Other (chores, tests, code style improvements etc.)

Tested on

  • iOS
  • Android

Testing instructions

  1. From packages/react-native-executorch, run ./scripts/create-package.sh.
  2. tar tzf react-native-executorch-*.tgz | grep phonemis/src | wc -l → 87 source files.
  3. tar tzf react-native-executorch-*.tgz | grep -E "phonemis/(data|test|requirements)" → empty.
  4. Install the tarball into a fresh RN/Expo app, run pod install + iOS/Android build; phonemis should compile cleanly into libreact-native-executorch.{a,so}.

Screenshots

Related issues

Checklist

  • I have performed a self-review of my code
  • I have commented my code, particularly in hard-to-understand areas
  • I have updated the documentation accordingly
  • My changes generate no new warnings

Additional notes

Init the phonemis submodule from create-package.sh so its sources are
present at npm pack time; previously the submodule was empty so the
podspec's third-party/common/phonemis/src glob found nothing and
TTS-using apps could not build from the published package.

Trim phonemis data/test/scripts/requirements.txt in the script (with a
trap-based restore) rather than via package.json `files` because the
submodule's own .gitignore re-includes scripts/build* via `!scripts/build*`
and that overrides the package.json exclusion in npm-packlist.
@msluszniak msluszniak merged commit 0e95b89 into main May 25, 2026
4 checks passed
@msluszniak msluszniak deleted the @ms/phonemis-submodule-pack branch May 25, 2026 10:38
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