Skip to content

Commit d02292d

Browse files
authored
Make FileSystem dependency explicit througout (more). (flutter#148095)
This is part 14 of a broken down version of the flutter#140101 refactor. This is an extension of part 8 (flutter#146008), which had omitted removing the filesystem dependency in the SkiaGoldClient class. This only makes one dependency explicit. Further PRs will do the same for other dependencies, until these APIs have no hidden dependencies. This particular change attempts to be minimal. I made no effort to keep the order of parameters reasonable here. I have a TODO to do a refactor sweep later that does nothing but reorder arguments/parameters/fields to be consistent.
1 parent 165e535 commit d02292d

File tree

2 files changed

+5
-2
lines changed

2 files changed

+5
-2
lines changed

packages/flutter_goldens/lib/flutter_goldens.dart

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -293,6 +293,7 @@ class FlutterPostSubmitFileComparator extends FlutterGoldenFileComparator {
293293
baseDirectory,
294294
log: log,
295295
platform: platform,
296+
fs: fs,
296297
);
297298
await goldens.auth();
298299
return FlutterPostSubmitFileComparator(
@@ -384,6 +385,7 @@ class FlutterPreSubmitFileComparator extends FlutterGoldenFileComparator {
384385
baseDirectory,
385386
platform: platform,
386387
log: log,
388+
fs: fs,
387389
);
388390

389391
await goldens.auth();
@@ -470,6 +472,7 @@ class FlutterSkippingFileComparator extends FlutterGoldenFileComparator {
470472
fs.directory(basedir),
471473
platform: platform,
472474
log: log,
475+
fs: fs,
473476
);
474477
return FlutterSkippingFileComparator(
475478
basedir,
@@ -571,6 +574,7 @@ class FlutterLocalFileComparator extends FlutterGoldenFileComparator with LocalC
571574
baseDirectory,
572575
platform: platform,
573576
log: log,
577+
fs: fs,
574578
);
575579
try {
576580
// Check if we can reach Gold.

packages/flutter_goldens/lib/skia_client.dart

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,6 @@ import 'dart:io' as io;
88

99
import 'package:crypto/crypto.dart';
1010
import 'package:file/file.dart';
11-
import 'package:file/local.dart';
1211
import 'package:path/path.dart' as path;
1312
import 'package:platform/platform.dart';
1413
import 'package:process/process.dart';
@@ -50,7 +49,7 @@ class SkiaGoldClient {
5049
/// override the defaults for [fs], [process], and [httpClient].
5150
SkiaGoldClient(
5251
this.workDirectory, {
53-
this.fs = const LocalFileSystem(),
52+
required this.fs,
5453
this.process = const LocalProcessManager(),
5554
required this.platform,
5655
Abi? abi,

0 commit comments

Comments
 (0)