From da5dc148a0430b6c4224b59178db5385d79b2298 Mon Sep 17 00:00:00 2001 From: Daco Harkes Date: Tue, 10 Dec 2024 10:15:35 +0100 Subject: [PATCH] [native_assets_builder] If dill file is equal, don't invalidate cache (#1789) --- .../lib/src/build_runner/build_runner.dart | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/pkgs/native_assets_builder/lib/src/build_runner/build_runner.dart b/pkgs/native_assets_builder/lib/src/build_runner/build_runner.dart index 8390608cd..3fccab6c1 100644 --- a/pkgs/native_assets_builder/lib/src/build_runner/build_runner.dart +++ b/pkgs/native_assets_builder/lib/src/build_runner/build_runner.dart @@ -407,8 +407,9 @@ ${e.message} final modifiedDuringBuild = await dependenciesHashes.hashDependencies( [ ...result.dependencies, - // Also depend on the hook source code. - hookHashes.file.uri, + // Also depend on the compiled hook. Don't depend on the sources, + // if only whitespace changes, we don't need to rerun the hook. + hookKernelFile.uri, ], lastModifiedCutoffTime, environment,