[flutter_tools] Watch transitive #include headers for FragmentProgram hot reload#187945
Conversation
… hot reload Pass --depfile to impellerc and track dependencies in DevelopmentShaderCompiler to trigger hot reload when transitive includes are modified. Fixes flutter#186343
There was a problem hiding this comment.
Code Review
This pull request introduces tracking of transitive shader dependencies in DevelopmentShaderCompiler to determine if shaders need recompilation during DevFS syncs. It parses depfiles generated by impellerc and exposes areDependenciesModified to check for modified dependencies. Feedback highlights a potential FileSystemException when calling dep.statSync() in areDependenciesModified, which could crash the sync process and should be wrapped in a try-catch block.
|
An existing Git SHA, To re-trigger presubmits after closing or re-opeing a PR, or pushing a HEAD commit (i.e. with |
Wrap dependency existence and stat checks in a try-catch block in areDependenciesModified to prevent crashing the DevFS sync process if a FileSystemException occurs.
|
autosubmit label was removed for flutter/flutter/187945, because The base commit of the PR is older than 7 days and can not be merged. Please merge the latest changes from the main into this branch and resubmit the PR. |
|
auto label is removed for flutter/flutter/187945, Failed to enqueue flutter/flutter/187945 with HTTP 400: No merge queue found for branch 'main'. |
|
An existing Git SHA, To re-trigger presubmits after closing or re-opeing a PR, or pushing a HEAD commit (i.e. with |
|
autosubmit label was removed for flutter/flutter/187945, because Pull request flutter/flutter/187945 is not in a mergeable state. |
# Conflicts: # packages/flutter_tools/lib/src/devfs.dart
…r-187945 # Conflicts: # packages/flutter_tools/lib/src/build_system/tools/shader_compiler.dart # packages/flutter_tools/test/general.shard/build_system/targets/shader_compiler_test.dart
Fixes #186343
This PR enables hot reloading of shaders when their transitive
#includedependencies are modified.Changes:
--depfiletoimpellercto generate dependency files.DevelopmentShaderCompilerusingDepfileService.