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
master
韩天峰 3 weeks ago
parent d5e748e54c
commit 689ffee831
  1. 5
      README-CN.md
  2. 7
      README.md
  3. 5
      project-release.yml

@ -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 php run-tests.php -q -j8 --compiler ./tpc tests/compiler
``` ```
`project.yml` 有意从磁盘加载 Composer 依赖。PHPT 每个用例都会启动一次编译器, 开发和 PHPT 使用的 `project.yml` 直接使用源码树中的 Composer 安装。发布打包阶段
如果把完整 Composer 运行时嵌入测试编译器,每个用例都会重复承担初始化开销。 安装生产依赖,并使用 `project-release.yml` 单独构建可独立运行的编译器:
发布打包阶段安装生产依赖,并单独构建可独立运行的编译器:
```bash ```bash
composer install --no-dev --classmap-authoritative composer install --no-dev --classmap-authoritative

@ -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 php run-tests.php -q -j8 --compiler ./tpc tests/compiler
``` ```
`project.yml` deliberately leaves Composer dependencies on disk. PHPT starts `project.yml` deliberately uses the source tree's Composer installation for
the compiler once per test, so embedding the complete Composer runtime would development and PHPT. Release packaging installs production dependencies and
add its initialization cost to every case. Release packaging installs builds the standalone compiler separately with `project-release.yml`:
production dependencies and builds the standalone compiler separately:
```bash ```bash
composer install --no-dev --classmap-authoritative composer install --no-dev --classmap-authoritative

@ -1,7 +1,6 @@
include: project.yml include: project.yml
# Release binaries carry their Composer runtime as embedded opcodes and files. # Release binaries carry their production Composer runtime as embedded opcodes
# Development and PHPT bootstrap builds use project.yml to avoid paying this # and files. Development and PHPT bootstrap builds use project.yml directly.
# initialization cost for every compiler process.
embedded-files: embedded-files:
- ./vendor - ./vendor

Loading…
Cancel
Save