Repository navigation
chore(package): ship only the HDiffPatch / lzma files the builds compile - #670
Conversation
package.json `files` shipped the whole android/jni tree, so 751 of the 910 packed files were the two submodules (tests, other codecs, docs, Java/C# ports). Consumers never build android/jni (Android uses the prebuilt .so); the podspec and Harmony's CMakeLists.txt compile four C sources from it. `files` now lists those sources, their include closure (computed with `cc -M`) and the two licenses: 910 -> 176 files. Because a header missing from that list would only show up in a consumer's pod install (the e2e builds copy the source tree), check-packlist gains --compile: it packs the real tarball, unpacks it and syntax-checks the submodule sources, cpp/hpatch and the patch core using only the packed files. test.yml's C++ job runs it, and now also triggers on package.json. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info
📝 Walkthrough
Merge Risk: ⚪ Minimal · up to
|
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Bump package.json and harmony/pushy/oh-package.json5 together, with the bilingual release notes. Ships everything since 10.60.0: the shared native round engine (#673-#681), the cross-platform alignment and fixes (#664, #666, #671, #687, #688), the JS client fixes and split (#667, #684, #685), the bounded host prepareBundle (#669), the generated cross-platform contract (#683, #686) and the trimmed npm package (#670). Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
架构审查里的打包项:npm 包把两个子模块整棵目录都发了出去。
改了什么
files改为精确清单。 以前整个android/jni都会打进包,910 个文件里有 751 个来自 HDiffPatch 和 lzma 子模块,包括测试、其他压缩算法、文档以及 Java/C# 移植版。消费者不会构建android/jni,Android 用的是预编译的.so;只有 podspec 和鸿蒙的 CMakeLists.txt 会从中编译 4 个 C 源文件。现在只发这 4 个文件、它们的头文件闭包(用cc -M算出),外加两个子模块的许可证。包的文件数从 910 降到 176。check-packlist --compile: 先打出真实的 tarball 并解压,再只用包内文件对子模块源码、cpp/hpatch和 patch 内核做语法编译。e2e 构建复制的是源码树,所以清单漏了某个头文件时,它们发现不了,问题只会在用户执行pod install时暴露。这项检查加在test.yml的 C++ job 里,该 job 现在也会被package.json的改动触发。验证
node scripts/check-packlist.js --compile通过。反向验证过:从清单里拿掉Precomp.h后,检查失败,并明确报出LzmaDec.c找不到这个头文件。--release也通过,确认发版的必需文件清单里包含两份许可证。bun lint通过,bun test全部通过。🤖 Generated with Claude Code
Need help on this PR? Tag
@codesmith-botwith what you need.Summary by CodeRabbit