Repository navigation
chore: quickjs-kmp 0.1.4(16 KB 页面对齐),CLI 的 qjsc-kmp 只要求同一上游 commit(0.10.1) - #34
Conversation
…10.1) - catalog quickjsKmp 0.1.2 → 0.1.4:Android .so 改为 16 KB 页面对齐链接;0.1.3、0.1.4 未改上游源码与编译器(native/UPSTREAM 仍是 04be246) - 删掉 qjsc.test.ts 的「CLI 依赖的 qjsc-kmp 版本 == quickjsKmp」:字节码绑定的是上游 commit 而不是版本号,真正的校验早已由 runtime:check + RuntimeBytecodeTest 完成(CLI 编出的运行时文件头必须等于链接引擎的 QuickJs.upstreamCommit);qjsc-kmp 0.1.4 暂未上 npm,CLI 继续用 0.1.2 - hostVersion 规则限定为上游 commit 变化:只改构建参数或绑定层的 quickjs-kmp 升级不算换引擎 - 版本 0.10.1;docs/build-chain.md §5、docs/updates.md 同步 Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Reviewer's guide (collapsed on small PRs)Reviewer's Guide本 PR 发布 tinyui 0.10.1,将 quickjs-kmp 升至 0.1.4 以支持 Android 16 KB 页面对齐,但保留使用同一上游 commit 的 qjsc-kmp 0.1.2;同时移除基于工具版本号的 CLI 校验,改由运行时字节码与链接引擎的上游 commit 校验兼容性,并更新 hostVersion 规则与相关包版本。 Sequence diagram for bytecode engine compatibility validationsequenceDiagram
participant CLI as qjsc-kmp CLI
participant RuntimeCheck as runtime:check
participant RuntimeTest as RuntimeBytecodeTest
participant Engine as Linked QuickJs engine
CLI->>RuntimeCheck: runtime:check
RuntimeCheck-->>RuntimeTest: Consistent embedded runtime bytecode
RuntimeTest->>Engine: QuickJs.upstreamCommit
RuntimeTest->>RuntimeTest: Compare bytecode header with upstreamCommit
alt upstream commits match
RuntimeTest-->>CLI: Compatibility validated
else upstream commits differ
RuntimeTest-->>CLI: CI failure
end
Flow diagram for quickjs-kmp and qjsc-kmp version compatibilityflowchart LR
A[quickjs-kmp 0.1.4] --> B[Android .so 16 KB page alignment]
A --> C[Upstream commit 04be246]
D[qjsc-kmp 0.1.2] --> C
C --> E[Bytecode accepted]
F[Version number mismatch] -. not authoritative .-> E
Flow diagram for hostVersion engine-change ruleflowchart TD
A[quickjs-kmp upgrade] --> B{Upstream commit changed?}
B -->|Yes| C[Engine change]
C --> D[Increment hostVersion]
B -->|No| E[Build or binding-only change]
E --> F[No hostVersion change]
F --> G[Existing bytecode remains accepted]
File-Level Changes
Tips and commandsInteracting with Sourcery
Customizing Your ExperienceAccess your dashboard to:
Getting Help
|
|
Important
This repository does not receive automatic reviews because it has fewer than 10 stars. ⚙️ Run configuration
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 |
There was a problem hiding this comment.
CodeSeer 审查
结论:批准
摘要
本次改动将 Kotlin 侧的 quickjsKmp 升级至 0.1.4,并将各 npm 包版本同步至 0.10.1。与此同时,文档将 CLI 与宿主引擎的兼容性判定从包版本号调整为 QuickJS 上游 commit,并移除了对应的版本号一致性测试。根据给出的改动,未发现可由代码直接证实的逻辑、安全或兼容性问题。
整个 PR 至 eb419d2 · gpt-5.6-terra
There was a problem hiding this comment.
Hey - I've found 3 issues
Prompt for AI Agents
Please address the comments from this code review:
## Individual Comments
### Comment 1
<location path="packages/core/src/version.ts" line_range="2" />
<code_context>
/** The tinyui-core version; a package records it as the runtime it needs (docs/updates.md §1.1). */
-export const VERSION = "0.10.0";
+export const VERSION = "0.10.1";
</code_context>
<issue_to_address>
**Runtime bytecode stays stale**
When `VERSION` changes but `RuntimeBytecode.kt` is not regenerated, `runtime:check` recompiles the core entry, which exports `VERSION`, and compares the result with the unchanged `RuntimeBytecode.kt`; the bytecode differs, so the CI build fails.
Regenerate and commit `RuntimeBytecode.kt` with `pnpm runtime`.
</issue_to_address>
### Comment 2
<location path="packages/cli/package.json" line_range="3" />
<code_context>
{
"name": "tinyui-cli",
- "version": "0.10.0",
+ "version": "0.10.1",
"description": "TinyUI build tool: TSX -> h() (ES2025) -> ESM module bytecode.",
"license": "MIT",
</code_context>
<issue_to_address>
**Existing hosts reject patch bundles**
When a 0.10.1 bundle targets an existing host snapshot whose tinyui floor is 0.10.0, `tinyuiVersion` stamps the bundle as 0.10.1, so `publish` rejects it against the frozen 0.10.0 floor and hosts cannot publish patch bundles under their existing `hostVersion`.
Keep patch-only releases compatible with existing 0.10.0 floors by adjusting version stamping or compatibility checks so those snapshots still accept the bundle.
Also at `packages/core/package.json:3`, `docs/updates.md:168`, `packages/core/src/version.ts:2`.
</issue_to_address>
### Comment 3
<location path="docs/build-chain.md" line_range="81" />
<code_context>
+字节码绑定引擎构建(文件头记上游 commit,quickjs-kmp `docs/native-build.md`"字节码与宿主工具"),CLI 用的 `qjsc-kmp` 必须与 App 链接的 quickjs-kmp 同一上游 commit。`tinyui-cli` 依赖的 `qjsc-kmp` 通常与 catalog 的 `quickjsKmp` 同版本,但校验的是上游 commit 而不是版本号:内置运行时由 CLI 的 `qjsc-kmp` 编出(`pnpm runtime:check` 保证入库的与现编一致),`RuntimeBytecodeTest` 核对它的文件头与链接引擎的 `QuickJs.upstreamCommit` 相等,两边 commit 不同 CI 即失败。所以上游 commit 不变的 quickjs-kmp 版本两边可以不同步:0.10.1 起 catalog 为 0.1.4,`qjsc-kmp` 仍是 0.1.2(0.1.3、0.1.4 只把 Android `.so` 改成 16 KB 页面对齐,编译器源码未动,npm 上也没有这两版)。JS 工程的 `tinyui-cli` 与 App 的 `tinyui` 之间,只要两边的上游 commit 相同,引擎就对得上;JS 工程的 `tinyui-cli` 须与目标宿主的 tinyui 下限兼容:同 major 且不高于它(updates.md §1.1、§1.3)。某个 tinyui 版本升级了 `quickjsKmp` 且上游 commit 随之改变(即 `manifest.engine` 变了)时,宿主升到它就是换引擎,按 updates.md §4.1 加 `hostVersion`,下限随之抬到这个版本;只改构建参数或绑定层、上游 commit 不变的升级(如 0.10.1 的 quickjs-kmp 0.1.4)不算换引擎,旧字节码照常被接受,不加。
</code_context>
<issue_to_address>
**README rejects supported compiler pairing**
When CLI users consult the README for compiler-version guidance, `packages/cli/README.md` says `qjsc-kmp` must match the exact `quickjs-kmp` version, so users treat the supported 0.1.2 compiler and 0.1.4 SDK pairing as incompatible and may seek an unavailable npm version.
Update the README to explain that the upstream commits must match, and document that `qjsc-kmp` 0.1.2 works with `quickjs-kmp` 0.1.4.
</issue_to_address>Sourcery assessment
Approval pending. 2 findings to address first.
Blocking findings: packages/core/src/version.ts:2, packages/cli/package.json:3
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
本地验证:用 quickjs-kmp 0.1.4 tag 编的宿主 JNI 跑 CI 同款 gradle 任务全部通过(含 RuntimeBytecodeTest);sample APK 三个 ABI 的 libquickjs_kmp.so LOAD 段对齐均为 16384。
🤖 Generated with Claude Code
Summary by Sourcery
Upgrade TinyUI to QuickJS KMP 0.1.4 and release version 0.10.1 while validating bytecode compatibility by upstream engine commit.
Enhancements:
Build:
CI:
Documentation:
Chores: