@@ -156,13 +156,21 @@ protected function execute(InputInterface $input, OutputInterface $output): int
156156 copy ($ projectYmlPath , $ stageBuildDir . DIRECTORY_SEPARATOR . 'project.linux.yml ' );
157157 $ output ->writeln ('<comment>[2/3] Generated compiler config: project.linux.yml</comment> ' );
158158
159- // 汇总各类 AOT 生成源(平铺守卫源、静态属性补丁源、可变参数闭包补丁源)
160- $ flattenedHashes = $ this ->collectGeneratedHashes ($ basePath , ProjectGenerator::GUARDED_SOURCES );
161- $ patchedHashes = $ this ->collectGeneratedHashes ($ basePath , ProjectGenerator::NULLABLE_STATIC_SOURCES );
162- $ variadicHashes = $ this ->collectGeneratedHashes ($ basePath , ProjectGenerator::VARIADIC_HANDLER_SOURCES );
163- $ this ->reportGeneratedSources ($ output , 'flattened ' , $ flattenedHashes );
164- $ this ->reportGeneratedSources ($ output , 'nullable-static ' , $ patchedHashes );
165- $ this ->reportGeneratedSources ($ output , 'variadic-handler ' , $ variadicHashes );
159+ // 汇总各类 AOT 生成源的输入摘要:标签用于终端提示,同名 <label>_hashes 键写入 manifest
160+ $ generatedSourceGroups = [
161+ 'flattened ' => ProjectGenerator::GUARDED_SOURCES ,
162+ 'nullable-static ' => ProjectGenerator::NULLABLE_STATIC_SOURCES ,
163+ 'stray-bootstrap ' => ProjectGenerator::STRAY_BOOTSTRAP_SOURCES ,
164+ 'variadic-handler ' => ProjectGenerator::VARIADIC_HANDLER_SOURCES ,
165+ 'switch-terminal ' => ProjectGenerator::SWITCH_TERMINAL_SOURCES ,
166+ 'ref-capture ' => ProjectGenerator::REF_CAPTURE_SOURCES ,
167+ ];
168+ $ generatedHashes = [];
169+ foreach ($ generatedSourceGroups as $ label => $ targets ) {
170+ $ hashes = $ this ->collectGeneratedHashes ($ basePath , $ targets );
171+ $ this ->reportGeneratedSources ($ output , $ label , $ hashes );
172+ $ generatedHashes [str_replace ('- ' , '_ ' , $ label ) . '_hashes ' ] = $ hashes ;
173+ }
166174
167175 // 生成 build-manifest.json 记录元数据
168176 $ manifest = [
@@ -175,9 +183,7 @@ protected function execute(InputInterface $input, OutputInterface $output): int
175183 'inputs ' => [
176184 'main_hash ' => file_exists ($ basePath . '/main.php ' ) ? sha1_file ($ basePath . '/main.php ' ) : '' ,
177185 'config_hash ' => sha1_file ($ projectYmlPath ),
178- 'flattened_hashes ' => $ flattenedHashes ,
179- 'nullable_static_hashes ' => $ patchedHashes ,
180- 'variadic_handler_hashes ' => $ variadicHashes ,
186+ ...$ generatedHashes ,
181187 ],
182188 ];
183189 file_put_contents ($ stageBuildDir . DIRECTORY_SEPARATOR . 'build-manifest.json ' , json_encode (
0 commit comments