mirror of
https://github.com/flutter/flutter.git
synced 2026-02-20 02:29:02 +08:00
Use Dart version in script cache check (#29721)
This commit is contained in:
parent
8e7e435706
commit
40cbdd11cd
@ -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;
|
||||
}
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user