Unverified Commit 40cbdd11 authored by Jonah Williams's avatar Jonah Williams Committed by GitHub

Use Dart version in script cache check (#29721)

parent 8e7e4357
......@@ -18,6 +18,7 @@ import '../base/common.dart';
import '../base/file_system.dart';
import '../base/io.dart';
import '../base/logger.dart';
import '../base/platform.dart';
import '../base/process_manager.dart';
import '../codegen.dart';
import '../dart/package_map.dart';
......@@ -205,10 +206,12 @@ class _BuildRunnerCodegenDaemon implements CodegenDaemon {
// Sorts the builders by name and produces a hashcode of the resulting iterable.
List<int> _produceScriptId(YamlMap builders) {
if (builders == null || builders.isEmpty) {
return md5.convert(<int>[]).bytes;
return md5.convert(platform.version.codeUnits).bytes;
}
final List<String> orderedBuilders = builders.keys
.cast<String>()
.toList()..sort();
return md5.convert(orderedBuilders.join('').codeUnits).bytes;
return md5.convert(orderedBuilders
.followedBy(<String>[platform.version])
.join('').codeUnits).bytes;
}
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment