Skip to content

Commit 4814ef9

Browse files
committed
address comments
1 parent 3113f5e commit 4814ef9

File tree

1 file changed

+8
-7
lines changed

1 file changed

+8
-7
lines changed

pkgs/native_assets_builder/lib/src/dependencies_hash_file/dependencies_hash_file.dart

+8-7
Original file line numberDiff line numberDiff line change
@@ -33,12 +33,12 @@ class DependenciesHashFile {
3333
void _reset() => _hashes = FileSystemHashes();
3434

3535
/// Populate the hashes and persist file with entries from
36-
/// [fileSystemEntities].
36+
/// [fileSystemEntities] and [environment].
3737
///
38-
/// If [fileSystemValidBeforeLastModified] is provided, any entities that were
39-
/// modified after [fileSystemValidBeforeLastModified] will get a dummy hash
40-
/// so that they will show up as outdated. If any such entity exists, its uri
41-
/// will be returned.
38+
/// Any file system entities that were modified after
39+
/// [fileSystemValidBeforeLastModified] will get a dummy hash so that they
40+
/// will show up as outdated. If any such entity exists, its uri will be
41+
/// returned.
4242
Future<Uri?> hashDependencies(
4343
List<Uri> fileSystemEntities,
4444
DateTime fileSystemValidBeforeLastModified,
@@ -135,8 +135,9 @@ class DependenciesHashFile {
135135
return _hashNotExists;
136136
}
137137
final children = directory.listSync(followLinks: true, recursive: false);
138-
final childrenNames = children.map((e) => _pathBaseName(e.path)).join(';');
139-
return _md5int64(utf8.encode(childrenNames));
138+
final childrenNames = children.map((e) => _pathBaseName(e.path)).toList()
139+
..sort();
140+
return _md5int64(utf8.encode(childrenNames.join(';')));
140141
}
141142

142143
int _hashEnvironmentValue(String? value) {

0 commit comments

Comments
 (0)