From 689ffee831556775a272dee5c3c0f3a8e1ee7218 Mon Sep 17 00:00:00 2001 From: tianfenghan Date: Mon, 21 Sep 2026 16:07:23 +0800 Subject: [PATCH] docs(build): update documentation for release binary packaging - Clarified that release binaries embed production Composer runtime as opcodes - Updated project-release.yml to remove embedded vendor directory - Revised README to explain development vs production build processes - Updated Chinese documentation to reflect new build configuration - Removed outdated comments about PHPT bootstrap initialization costs - Documented proper usage of project.yml vs project-release.yml for different scenarios --- README-CN.md | 5 ++--- README.md | 7 +++---- project-release.yml | 5 ++--- 3 files changed, 7 insertions(+), 10 deletions(-) diff --git a/README-CN.md b/README-CN.md index effe206d..ca504f29 100644 --- a/README-CN.md +++ b/README-CN.md @@ -751,9 +751,8 @@ PHPX_HOME=/path/to/phpx php bin/tpc.php project.yml --job 2 --no-progress php run-tests.php -q -j8 --compiler ./tpc tests/compiler ``` -`project.yml` 有意从磁盘加载 Composer 依赖。PHPT 每个用例都会启动一次编译器, -如果把完整 Composer 运行时嵌入测试编译器,每个用例都会重复承担初始化开销。 -发布打包阶段安装生产依赖,并单独构建可独立运行的编译器: +开发和 PHPT 使用的 `project.yml` 直接使用源码树中的 Composer 安装。发布打包阶段 +安装生产依赖,并使用 `project-release.yml` 单独构建可独立运行的编译器: ```bash composer install --no-dev --classmap-authoritative diff --git a/README.md b/README.md index 50f63656..6e4e5139 100644 --- a/README.md +++ b/README.md @@ -820,10 +820,9 @@ PHPX_HOME=/path/to/phpx php bin/tpc.php project.yml --job 2 --no-progress php run-tests.php -q -j8 --compiler ./tpc tests/compiler ``` -`project.yml` deliberately leaves Composer dependencies on disk. PHPT starts -the compiler once per test, so embedding the complete Composer runtime would -add its initialization cost to every case. Release packaging installs -production dependencies and builds the standalone compiler separately: +`project.yml` deliberately uses the source tree's Composer installation for +development and PHPT. Release packaging installs production dependencies and +builds the standalone compiler separately with `project-release.yml`: ```bash composer install --no-dev --classmap-authoritative diff --git a/project-release.yml b/project-release.yml index 9bc99402..2021da7f 100644 --- a/project-release.yml +++ b/project-release.yml @@ -1,7 +1,6 @@ include: project.yml -# Release binaries carry their Composer runtime as embedded opcodes and files. -# Development and PHPT bootstrap builds use project.yml to avoid paying this -# initialization cost for every compiler process. +# Release binaries carry their production Composer runtime as embedded opcodes +# and files. Development and PHPT bootstrap builds use project.yml directly. embedded-files: - ./vendor