From a76768bb9f079c7efe849a31c754ece0c6c6ed0a Mon Sep 17 00:00:00 2001 From: Zachary Anderson Date: Thu, 16 Mar 2023 10:31:39 -0700 Subject: [PATCH] Print the malioc_diff.py command to update for new shaders (flutter/engine#40322) --- engine/src/flutter/impeller/tools/malioc_diff.py | 14 ++++++++++---- 1 file changed, 10 insertions(+), 4 deletions(-) diff --git a/engine/src/flutter/impeller/tools/malioc_diff.py b/engine/src/flutter/impeller/tools/malioc_diff.py index 9eb462cc25..7a77970a89 100755 --- a/engine/src/flutter/impeller/tools/malioc_diff.py +++ b/engine/src/flutter/impeller/tools/malioc_diff.py @@ -287,12 +287,18 @@ def main(argv): for filename, shaders in after_json.items(): if filename not in before_json: - print( - 'Shader {} is new. Run with --update to update checked-in results' - .format(filename) - ) + print('Shader {} is new.'.format(filename)) changed = True + if changed: + print( + 'There are new shaders, or performance changes to existing shaders. ' + 'The golden file must be updated after a build of android_debug_unopt ' + 'using the --malioc-path flag to the flutter/tools/gn script.\n\n' + '$ ./flutter/impeller/tools/malioc_diff.py --before {} --after {} --update' + .format(args.before, args.after) + ) + return 1 if changed else 0