Revert "Add and plumb useImplicitPubspecResolution across flutter_tools." (#158076)
Reverts flutter/flutter#157879 to unblock flutter roll. Prerequisite reverts: https://github.com/flutter/flutter/pull/157934 Reason: b/377107864
This commit is contained in:
committed by
GitHub
parent
f7b24fa525
commit
0505176f1b
@@ -1260,7 +1260,6 @@ class FakeHotRunnerFactory extends Fake implements HotRunnerFactory {
|
||||
Analytics? analytics,
|
||||
String? nativeAssetsYamlFile,
|
||||
HotRunnerNativeAssetsBuilder? nativeAssetsBuilder,
|
||||
required bool useImplicitPubspecResolution,
|
||||
}) {
|
||||
if (_artifactTester != null) {
|
||||
for (final FlutterDevice device in devices) {
|
||||
|
||||
@@ -99,7 +99,6 @@ void main() {
|
||||
daemon = Daemon(
|
||||
daemonConnection,
|
||||
notifyingLogger: notifyingLogger,
|
||||
useImplicitPubspecResolution: true,
|
||||
);
|
||||
daemonStreams.inputs.add(DaemonMessage(<String, Object?>{'id': 0, 'method': 'daemon.version'}));
|
||||
final DaemonMessage response = await daemonStreams.outputs.stream.firstWhere(_notEvent);
|
||||
@@ -112,7 +111,6 @@ void main() {
|
||||
daemon = Daemon(
|
||||
daemonConnection,
|
||||
notifyingLogger: notifyingLogger,
|
||||
useImplicitPubspecResolution: true,
|
||||
);
|
||||
// Use the flutter_gallery project which has a known set of supported platforms.
|
||||
final String projectPath = globals.fs.path.join(getFlutterRoot(), 'dev', 'integration_tests', 'flutter_gallery');
|
||||
@@ -217,7 +215,6 @@ void main() {
|
||||
daemon = Daemon(
|
||||
daemonConnection,
|
||||
notifyingLogger: notifyingLogger,
|
||||
useImplicitPubspecResolution: true,
|
||||
);
|
||||
globals.printError('daemon.logMessage test');
|
||||
final DaemonMessage response = await daemonStreams.outputs.stream.firstWhere((DaemonMessage message) {
|
||||
@@ -236,7 +233,6 @@ void main() {
|
||||
daemon = Daemon(
|
||||
daemonConnection,
|
||||
notifyingLogger: notifyingLogger,
|
||||
useImplicitPubspecResolution: true,
|
||||
);
|
||||
globals.printWarning('daemon.logMessage test');
|
||||
final DaemonMessage response = await daemonStreams.outputs.stream.firstWhere((DaemonMessage message) {
|
||||
@@ -257,7 +253,6 @@ void main() {
|
||||
daemonConnection,
|
||||
notifyingLogger: notifyingLogger,
|
||||
logToStdout: true,
|
||||
useImplicitPubspecResolution: true,
|
||||
);
|
||||
globals.printStatus('daemon.logMessage test');
|
||||
return Future<void>.value();
|
||||
@@ -274,7 +269,6 @@ void main() {
|
||||
daemonConnection,
|
||||
notifyingLogger: notifyingLogger,
|
||||
logToStdout: true,
|
||||
useImplicitPubspecResolution: true,
|
||||
);
|
||||
globals.printBox('This is the box message', title: 'Sample title');
|
||||
return Future<void>.value();
|
||||
@@ -289,7 +283,6 @@ void main() {
|
||||
daemon = Daemon(
|
||||
daemonConnection,
|
||||
notifyingLogger: notifyingLogger,
|
||||
useImplicitPubspecResolution: true,
|
||||
);
|
||||
notifyingLogger.notifyVerbose = false;
|
||||
globals.printTrace('daemon.logMessage test 1');
|
||||
@@ -311,7 +304,6 @@ void main() {
|
||||
daemon = Daemon(
|
||||
daemonConnection,
|
||||
notifyingLogger: notifyingLogger,
|
||||
useImplicitPubspecResolution: true,
|
||||
);
|
||||
expect(notifyingLogger.notifyVerbose, false);
|
||||
|
||||
@@ -330,7 +322,6 @@ void main() {
|
||||
daemon = Daemon(
|
||||
daemonConnection,
|
||||
notifyingLogger: notifyingLogger,
|
||||
useImplicitPubspecResolution: true,
|
||||
);
|
||||
notifyingLogger.notifyVerbose = false;
|
||||
|
||||
@@ -349,7 +340,6 @@ void main() {
|
||||
daemon = Daemon(
|
||||
daemonConnection,
|
||||
notifyingLogger: notifyingLogger,
|
||||
useImplicitPubspecResolution: true,
|
||||
);
|
||||
daemonStreams.inputs.add(DaemonMessage(<String, Object?>{'id': 0, 'method': 'daemon.shutdown'}));
|
||||
return daemon.onExit.then<void>((int code) async {
|
||||
@@ -362,7 +352,6 @@ void main() {
|
||||
daemon = Daemon(
|
||||
daemonConnection,
|
||||
notifyingLogger: notifyingLogger,
|
||||
useImplicitPubspecResolution: true,
|
||||
);
|
||||
|
||||
daemonStreams.inputs.add(DaemonMessage(<String, Object?>{'id': 0, 'method': 'app.restart'}));
|
||||
@@ -375,7 +364,6 @@ void main() {
|
||||
daemon = Daemon(
|
||||
daemonConnection,
|
||||
notifyingLogger: notifyingLogger,
|
||||
useImplicitPubspecResolution: true,
|
||||
);
|
||||
|
||||
daemonStreams.inputs.add(DaemonMessage(<String, Object?>{
|
||||
@@ -394,7 +382,6 @@ void main() {
|
||||
daemon = Daemon(
|
||||
daemonConnection,
|
||||
notifyingLogger: notifyingLogger,
|
||||
useImplicitPubspecResolution: true,
|
||||
);
|
||||
|
||||
daemonStreams.inputs.add(DaemonMessage(<String, Object?>{'id': 0, 'method': 'app.stop'}));
|
||||
@@ -407,7 +394,6 @@ void main() {
|
||||
daemon = Daemon(
|
||||
daemonConnection,
|
||||
notifyingLogger: notifyingLogger,
|
||||
useImplicitPubspecResolution: true,
|
||||
);
|
||||
daemonStreams.inputs.add(DaemonMessage(<String, Object?>{'id': 0, 'method': 'device.getDevices'}));
|
||||
final DaemonMessage response = await daemonStreams.outputs.stream.firstWhere(_notEvent);
|
||||
@@ -419,7 +405,6 @@ void main() {
|
||||
daemon = Daemon(
|
||||
daemonConnection,
|
||||
notifyingLogger: notifyingLogger,
|
||||
useImplicitPubspecResolution: true,
|
||||
);
|
||||
final FakePollingDeviceDiscovery discoverer = FakePollingDeviceDiscovery();
|
||||
daemon.deviceDomain.addDeviceDiscoverer(discoverer);
|
||||
@@ -436,7 +421,6 @@ void main() {
|
||||
daemon = Daemon(
|
||||
daemonConnection,
|
||||
notifyingLogger: notifyingLogger,
|
||||
useImplicitPubspecResolution: true,
|
||||
);
|
||||
|
||||
final FakePollingDeviceDiscovery discoverer = FakePollingDeviceDiscovery();
|
||||
@@ -450,7 +434,6 @@ void main() {
|
||||
previewBinary: fs.file(r'preview_device.exe'),
|
||||
artifacts: Artifacts.test(fileSystem: fs),
|
||||
builderFactory: () => throw UnimplementedError('TODO implement builder factory'),
|
||||
useImplicitPubspecResolution: true,
|
||||
));
|
||||
|
||||
final List<Map<String, Object?>> names = <Map<String, Object?>>[];
|
||||
@@ -521,7 +504,6 @@ void main() {
|
||||
daemon = Daemon(
|
||||
daemonConnection,
|
||||
notifyingLogger: notifyingLogger,
|
||||
useImplicitPubspecResolution: true,
|
||||
);
|
||||
daemonStreams.inputs.add(DaemonMessage(<String, Object?>{'id': 0, 'method': 'device.discoverDevices'}));
|
||||
final DaemonMessage response = await daemonStreams.outputs.stream.firstWhere(_notEvent);
|
||||
@@ -533,7 +515,6 @@ void main() {
|
||||
daemon = Daemon(
|
||||
daemonConnection,
|
||||
notifyingLogger: notifyingLogger,
|
||||
useImplicitPubspecResolution: true,
|
||||
);
|
||||
final FakePollingDeviceDiscovery discoverer = FakePollingDeviceDiscovery();
|
||||
daemon.deviceDomain.addDeviceDiscoverer(discoverer);
|
||||
@@ -551,7 +532,6 @@ void main() {
|
||||
daemon = Daemon(
|
||||
daemonConnection,
|
||||
notifyingLogger: notifyingLogger,
|
||||
useImplicitPubspecResolution: true,
|
||||
);
|
||||
final FakePollingDeviceDiscovery discoverer = FakePollingDeviceDiscovery();
|
||||
daemon.deviceDomain.addDeviceDiscoverer(discoverer);
|
||||
@@ -576,7 +556,6 @@ void main() {
|
||||
daemon = Daemon(
|
||||
daemonConnection,
|
||||
notifyingLogger: notifyingLogger,
|
||||
useImplicitPubspecResolution: true,
|
||||
);
|
||||
final FakePollingDeviceDiscovery discoverer = FakePollingDeviceDiscovery();
|
||||
daemon.deviceDomain.addDeviceDiscoverer(discoverer);
|
||||
@@ -628,7 +607,6 @@ void main() {
|
||||
daemon = Daemon(
|
||||
daemonConnection,
|
||||
notifyingLogger: notifyingLogger,
|
||||
useImplicitPubspecResolution: true,
|
||||
);
|
||||
final FakePollingDeviceDiscovery discoverer = FakePollingDeviceDiscovery();
|
||||
daemon.deviceDomain.addDeviceDiscoverer(discoverer);
|
||||
@@ -695,7 +673,6 @@ void main() {
|
||||
daemon = Daemon(
|
||||
daemonConnection,
|
||||
notifyingLogger: notifyingLogger,
|
||||
useImplicitPubspecResolution: true,
|
||||
);
|
||||
final FakePollingDeviceDiscovery discoverer = FakePollingDeviceDiscovery();
|
||||
daemon.deviceDomain.addDeviceDiscoverer(discoverer);
|
||||
@@ -755,7 +732,6 @@ void main() {
|
||||
daemon = Daemon(
|
||||
daemonConnection,
|
||||
notifyingLogger: notifyingLogger,
|
||||
useImplicitPubspecResolution: true,
|
||||
);
|
||||
final FakePollingDeviceDiscovery discoverer1 = FakePollingDeviceDiscovery();
|
||||
discoverer1.diagnostics = <String>['fake diagnostic 1', 'fake diagnostic 2'];
|
||||
@@ -781,7 +757,6 @@ void main() {
|
||||
daemon = Daemon(
|
||||
daemonConnection,
|
||||
notifyingLogger: notifyingLogger,
|
||||
useImplicitPubspecResolution: true,
|
||||
);
|
||||
|
||||
daemonStreams.inputs.add(DaemonMessage(<String, Object?>{'id': 0, 'method': 'emulator.launch'}));
|
||||
@@ -794,7 +769,6 @@ void main() {
|
||||
daemon = Daemon(
|
||||
daemonConnection,
|
||||
notifyingLogger: notifyingLogger,
|
||||
useImplicitPubspecResolution: true,
|
||||
);
|
||||
final Map<String, Object?> params = <String, Object?>{'emulatorId': 'device', 'coldBoot': 1};
|
||||
daemonStreams.inputs.add(DaemonMessage(<String, Object?>{'id': 0, 'method': 'emulator.launch', 'params': params}));
|
||||
@@ -807,7 +781,6 @@ void main() {
|
||||
daemon = Daemon(
|
||||
daemonConnection,
|
||||
notifyingLogger: notifyingLogger,
|
||||
useImplicitPubspecResolution: true,
|
||||
);
|
||||
daemonStreams.inputs.add(DaemonMessage(<String, Object?>{'id': 0, 'method': 'emulator.getEmulators'}));
|
||||
final DaemonMessage response = await daemonStreams.outputs.stream.firstWhere(_notEvent);
|
||||
@@ -822,7 +795,6 @@ void main() {
|
||||
daemon = Daemon(
|
||||
daemonConnection,
|
||||
notifyingLogger: notifyingLogger,
|
||||
useImplicitPubspecResolution: true,
|
||||
);
|
||||
|
||||
// Respond to any requests from the daemon to expose a URL.
|
||||
@@ -842,7 +814,6 @@ void main() {
|
||||
daemon = Daemon(
|
||||
daemonConnection,
|
||||
notifyingLogger: notifyingLogger,
|
||||
useImplicitPubspecResolution: true,
|
||||
);
|
||||
|
||||
daemonStreams.inputs.add(DaemonMessage(<String, Object?>{'id': 0, 'method': 'devtools.serve'}));
|
||||
@@ -859,7 +830,6 @@ void main() {
|
||||
daemon = Daemon(
|
||||
daemonConnection,
|
||||
notifyingLogger: notifyingLogger,
|
||||
useImplicitPubspecResolution: true,
|
||||
);
|
||||
|
||||
daemonStreams.inputs.add(DaemonMessage(<String, Object?>{'id': 0, 'method': 'devtools.serve'}));
|
||||
@@ -890,7 +860,6 @@ void main() {
|
||||
daemon = Daemon(
|
||||
daemonConnection,
|
||||
notifyingLogger: notifyingLogger,
|
||||
useImplicitPubspecResolution: true,
|
||||
);
|
||||
daemonStreams.inputs.add(DaemonMessage(<String, Object?>{'id': 0, 'method': 'proxy.connect', 'params': <String, Object?>{'port': 123}}));
|
||||
|
||||
@@ -951,7 +920,6 @@ void main() {
|
||||
daemon = Daemon(
|
||||
daemonConnection,
|
||||
notifyingLogger: notifyingLogger,
|
||||
useImplicitPubspecResolution: true,
|
||||
);
|
||||
daemonStreams.inputs.add(DaemonMessage(<String, Object?>{'id': 0, 'method': 'proxy.connect', 'params': <String, Object?>{'port': 123}}));
|
||||
|
||||
@@ -972,7 +940,6 @@ void main() {
|
||||
daemon = Daemon(
|
||||
daemonConnection,
|
||||
notifyingLogger: notifyingLogger,
|
||||
useImplicitPubspecResolution: true,
|
||||
);
|
||||
daemonStreams.inputs.add(DaemonMessage(<String, Object?>{'id': 0, 'method': 'proxy.connect', 'params': <String, Object?>{'port': 123}}));
|
||||
|
||||
|
||||
@@ -64,7 +64,7 @@ void main() {
|
||||
ProcessManager: () => FakeProcessManager.any(),
|
||||
});
|
||||
|
||||
testUsingContext('not using synthetic packages (explicitly)', () async {
|
||||
testUsingContext('not using synthetic packages', () async {
|
||||
final Directory l10nDirectory = fileSystem.directory(
|
||||
fileSystem.path.join('lib', 'l10n'),
|
||||
);
|
||||
@@ -104,46 +104,6 @@ flutter:
|
||||
ProcessManager: () => FakeProcessManager.any(),
|
||||
});
|
||||
|
||||
testUsingContext('not using synthetic packages (due to --no-implicit-pubspec-resolution)', () async {
|
||||
final Directory l10nDirectory = fileSystem.directory(
|
||||
fileSystem.path.join('lib', 'l10n'),
|
||||
);
|
||||
final File arbFile = l10nDirectory.childFile(
|
||||
'app_en.arb',
|
||||
)..createSync(recursive: true);
|
||||
|
||||
arbFile.writeAsStringSync('''
|
||||
{
|
||||
"helloWorld": "Hello, World!",
|
||||
"@helloWorld": {
|
||||
"description": "Sample description"
|
||||
}
|
||||
}''');
|
||||
fileSystem.file('pubspec.yaml').writeAsStringSync('''
|
||||
flutter:
|
||||
generate: true''');
|
||||
|
||||
final GenerateLocalizationsCommand command = GenerateLocalizationsCommand(
|
||||
fileSystem: fileSystem,
|
||||
logger: logger,
|
||||
artifacts: artifacts,
|
||||
processManager: processManager,
|
||||
);
|
||||
await createTestCommandRunner(command).run(<String>[
|
||||
'--no-implicit-pubspec-resolution',
|
||||
'gen-l10n',
|
||||
]);
|
||||
|
||||
expect(l10nDirectory.existsSync(), true);
|
||||
expect(l10nDirectory.childFile('app_localizations_en.dart').existsSync(),
|
||||
true);
|
||||
expect(
|
||||
l10nDirectory.childFile('app_localizations.dart').existsSync(), true);
|
||||
}, overrides: <Type, Generator>{
|
||||
FileSystem: () => fileSystem,
|
||||
ProcessManager: () => FakeProcessManager.any(),
|
||||
});
|
||||
|
||||
testUsingContext('throws error when arguments are invalid', () async {
|
||||
final File arbFile = fileSystem.file(fileSystem.path.join('lib', 'l10n', 'app_en.arb'))
|
||||
..createSync(recursive: true);
|
||||
|
||||
@@ -71,7 +71,6 @@ void main() {
|
||||
daemon = Daemon(
|
||||
serverDaemonConnection,
|
||||
notifyingLogger: notifyingLogger,
|
||||
useImplicitPubspecResolution: true,
|
||||
);
|
||||
fakeDevice = FakeAndroidDevice();
|
||||
final FakePollingDeviceDiscovery discoverer = FakePollingDeviceDiscovery();
|
||||
@@ -93,7 +92,6 @@ void main() {
|
||||
daemon = Daemon(
|
||||
serverDaemonConnection,
|
||||
notifyingLogger: notifyingLogger,
|
||||
useImplicitPubspecResolution: true,
|
||||
);
|
||||
fakeDevice = FakeAndroidDevice();
|
||||
final FakePollingDeviceDiscovery discoverer = FakePollingDeviceDiscovery();
|
||||
@@ -116,7 +114,6 @@ void main() {
|
||||
daemon = Daemon(
|
||||
serverDaemonConnection,
|
||||
notifyingLogger: notifyingLogger,
|
||||
useImplicitPubspecResolution: true,
|
||||
);
|
||||
fakeDevice = FakeAndroidDevice();
|
||||
final FakePollingDeviceDiscovery discoverer = FakePollingDeviceDiscovery();
|
||||
@@ -147,7 +144,6 @@ void main() {
|
||||
daemon = Daemon(
|
||||
serverDaemonConnection,
|
||||
notifyingLogger: notifyingLogger,
|
||||
useImplicitPubspecResolution: true,
|
||||
);
|
||||
fakeDevice = FakeAndroidDevice();
|
||||
final FakePollingDeviceDiscovery discoverer = FakePollingDeviceDiscovery();
|
||||
@@ -201,7 +197,6 @@ void main() {
|
||||
daemon = Daemon(
|
||||
serverDaemonConnection,
|
||||
notifyingLogger: notifyingLogger,
|
||||
useImplicitPubspecResolution: true,
|
||||
);
|
||||
fakeDevice = FakeAndroidDevice();
|
||||
final FakePollingDeviceDiscovery discoverer = FakePollingDeviceDiscovery();
|
||||
|
||||
@@ -1584,14 +1584,14 @@ class DaemonCapturingRunCommand extends RunCommand {
|
||||
@override
|
||||
Daemon createMachineDaemon() {
|
||||
daemon = super.createMachineDaemon();
|
||||
appDomain = daemon.appDomain = CapturingAppDomain(daemon, useImplicitPubspecResolution: true);
|
||||
appDomain = daemon.appDomain = CapturingAppDomain(daemon);
|
||||
daemon.registerDomain(appDomain);
|
||||
return daemon;
|
||||
}
|
||||
}
|
||||
|
||||
class CapturingAppDomain extends AppDomain {
|
||||
CapturingAppDomain(super.daemon, {required super.useImplicitPubspecResolution});
|
||||
CapturingAppDomain(super.daemon);
|
||||
|
||||
String? userIdentifier;
|
||||
bool? enableDevTools;
|
||||
|
||||
@@ -544,6 +544,5 @@ class FakeBundleBuilder extends Fake implements BundleBuilder {
|
||||
String? assetDirPath,
|
||||
bool buildNativeAssets = true,
|
||||
@visibleForTesting BuildSystem? buildSystem,
|
||||
required bool useImplicitPubspecResolution,
|
||||
}) async {}
|
||||
}
|
||||
|
||||
@@ -53,7 +53,6 @@ nullable-getter: false
|
||||
file: configFile,
|
||||
logger: BufferLogger.test(),
|
||||
defaultArbDir: fileSystem.path.join('lib', 'l10n'),
|
||||
defaultSyntheticPackage: true,
|
||||
);
|
||||
|
||||
expect(options.arbDir, Uri.parse('arb').path);
|
||||
@@ -70,65 +69,6 @@ nullable-getter: false
|
||||
expect(options.nullableGetter, false);
|
||||
});
|
||||
|
||||
testWithoutContext(
|
||||
'parseLocalizationsOptions uses defaultSyntheticPackage = true', () async {
|
||||
final FileSystem fileSystem = MemoryFileSystem.test();
|
||||
final File configFile = fileSystem.file('l10n.yaml')..writeAsStringSync('''
|
||||
arb-dir: arb
|
||||
template-arb-file: example.arb
|
||||
output-localization-file: bar
|
||||
untranslated-messages-file: untranslated
|
||||
output-class: Foo
|
||||
header-file: header
|
||||
header: HEADER
|
||||
use-deferred-loading: true
|
||||
preferred-supported-locales: en_US
|
||||
# Intentionally omitted
|
||||
# synthetic-package: ...
|
||||
required-resource-attributes: false
|
||||
nullable-getter: false
|
||||
''');
|
||||
|
||||
final LocalizationOptions options = parseLocalizationsOptionsFromYAML(
|
||||
file: configFile,
|
||||
logger: BufferLogger.test(),
|
||||
defaultArbDir: fileSystem.path.join('lib', 'l10n'),
|
||||
defaultSyntheticPackage: true,
|
||||
);
|
||||
|
||||
expect(options.syntheticPackage, true);
|
||||
});
|
||||
|
||||
testWithoutContext(
|
||||
'parseLocalizationsOptions uses defaultSyntheticPackage = false',
|
||||
() async {
|
||||
final FileSystem fileSystem = MemoryFileSystem.test();
|
||||
final File configFile = fileSystem.file('l10n.yaml')..writeAsStringSync('''
|
||||
arb-dir: arb
|
||||
template-arb-file: example.arb
|
||||
output-localization-file: bar
|
||||
untranslated-messages-file: untranslated
|
||||
output-class: Foo
|
||||
header-file: header
|
||||
header: HEADER
|
||||
use-deferred-loading: true
|
||||
preferred-supported-locales: en_US
|
||||
# Intentionally omitted
|
||||
# synthetic-package: ...
|
||||
required-resource-attributes: false
|
||||
nullable-getter: false
|
||||
''');
|
||||
|
||||
final LocalizationOptions options = parseLocalizationsOptionsFromYAML(
|
||||
file: configFile,
|
||||
logger: BufferLogger.test(),
|
||||
defaultArbDir: fileSystem.path.join('lib', 'l10n'),
|
||||
defaultSyntheticPackage: false,
|
||||
);
|
||||
|
||||
expect(options.syntheticPackage, false);
|
||||
});
|
||||
|
||||
testWithoutContext('parseLocalizationsOptions handles preferredSupportedLocales as list', () async {
|
||||
final FileSystem fileSystem = MemoryFileSystem.test();
|
||||
final File configFile = fileSystem.file('l10n.yaml')..writeAsStringSync('''
|
||||
@@ -139,7 +79,6 @@ preferred-supported-locales: ['en_US', 'de']
|
||||
file: configFile,
|
||||
logger: BufferLogger.test(),
|
||||
defaultArbDir: fileSystem.path.join('lib', 'l10n'),
|
||||
defaultSyntheticPackage: true,
|
||||
);
|
||||
|
||||
expect(options.preferredSupportedLocales, <String>['en_US', 'de']);
|
||||
@@ -158,7 +97,6 @@ use-deferred-loading: string
|
||||
file: configFile,
|
||||
logger: BufferLogger.test(),
|
||||
defaultArbDir: fileSystem.path.join('lib', 'l10n'),
|
||||
defaultSyntheticPackage: true,
|
||||
),
|
||||
throwsException,
|
||||
);
|
||||
@@ -175,7 +113,6 @@ template-arb-file: {name}_en.arb
|
||||
file: configFile,
|
||||
logger: BufferLogger.test(),
|
||||
defaultArbDir: fileSystem.path.join('lib', 'l10n'),
|
||||
defaultSyntheticPackage: true,
|
||||
),
|
||||
throwsToolExit(),
|
||||
);
|
||||
|
||||
@@ -47,8 +47,7 @@ void main() {
|
||||
mainPath: globals.fs.path.join('lib', 'main.dart'),
|
||||
assetDirPath: 'example',
|
||||
depfilePath: 'example.d',
|
||||
buildSystem: buildSystem,
|
||||
useImplicitPubspecResolution: true,
|
||||
buildSystem: buildSystem
|
||||
);
|
||||
expect(globals.fs.file(globals.fs.path.join('example', 'kernel_blob.bin')).existsSync(), true);
|
||||
expect(globals.fs.file(globals.fs.path.join('example', 'LICENSE')).existsSync(), true);
|
||||
@@ -137,8 +136,7 @@ void main() {
|
||||
mainPath: 'lib/main.dart',
|
||||
assetDirPath: 'example',
|
||||
depfilePath: 'example.d',
|
||||
buildSystem: TestBuildSystem.all(BuildResult(success: false)),
|
||||
useImplicitPubspecResolution: true,
|
||||
buildSystem: TestBuildSystem.all(BuildResult(success: false))
|
||||
),
|
||||
throwsToolExit()
|
||||
);
|
||||
@@ -183,8 +181,7 @@ void main() {
|
||||
mainPath: mainPath,
|
||||
assetDirPath: assetDirPath,
|
||||
depfilePath: depfilePath,
|
||||
buildSystem: buildSystem,
|
||||
useImplicitPubspecResolution: true,
|
||||
buildSystem: buildSystem
|
||||
);
|
||||
|
||||
expect(env, isNotNull);
|
||||
|
||||
@@ -42,7 +42,6 @@ void main() {
|
||||
final int exitCode = await ColdRunner(devices,
|
||||
debuggingOptions: DebuggingOptions.enabled(BuildInfo.debug),
|
||||
target: 'main.dart',
|
||||
useImplicitPubspecResolution: true,
|
||||
).attach();
|
||||
expect(exitCode, 2);
|
||||
});
|
||||
@@ -59,7 +58,6 @@ void main() {
|
||||
await ColdRunner(devices,
|
||||
debuggingOptions: DebuggingOptions.enabled(BuildInfo.debug),
|
||||
target: 'main.dart',
|
||||
useImplicitPubspecResolution: true,
|
||||
).cleanupAtFinish();
|
||||
|
||||
expect(flutterDevice1.stopEchoingDeviceLogCount, 1);
|
||||
@@ -89,7 +87,6 @@ void main() {
|
||||
applicationBinary: applicationBinary,
|
||||
debuggingOptions: DebuggingOptions.enabled(BuildInfo.debug),
|
||||
target: 'main.dart',
|
||||
useImplicitPubspecResolution: true,
|
||||
).run();
|
||||
|
||||
expect(result, 1);
|
||||
@@ -106,7 +103,6 @@ void main() {
|
||||
debuggingOptions: DebuggingOptions.disabled(BuildInfo.debug),
|
||||
target: 'main.dart',
|
||||
traceStartup: true,
|
||||
useImplicitPubspecResolution: true,
|
||||
).run();
|
||||
|
||||
expect(result, 0);
|
||||
@@ -130,7 +126,6 @@ void main() {
|
||||
debuggingOptions: DebuggingOptions.disabled(BuildInfo.debug),
|
||||
target: 'main.dart',
|
||||
traceStartup: true,
|
||||
useImplicitPubspecResolution: true,
|
||||
).run();
|
||||
|
||||
expect(result, 0);
|
||||
|
||||
@@ -29,7 +29,6 @@ void main() {
|
||||
bindPorts.add(port);
|
||||
return socket;
|
||||
},
|
||||
useImplicitPubspecResolution: true,
|
||||
);
|
||||
await server.run();
|
||||
expect(bindCalledTimes, 1);
|
||||
@@ -57,7 +56,6 @@ void main() {
|
||||
}
|
||||
return socket;
|
||||
},
|
||||
useImplicitPubspecResolution: true,
|
||||
);
|
||||
await server.run();
|
||||
expect(bindCalledTimes, 2);
|
||||
|
||||
@@ -122,8 +122,7 @@ void main() {
|
||||
final CustomDevice device = CustomDevice(
|
||||
config: testConfig,
|
||||
processManager: FakeProcessManager.any(),
|
||||
logger: BufferLogger.test(),
|
||||
useImplicitPubspecResolution: true,
|
||||
logger: BufferLogger.test()
|
||||
);
|
||||
|
||||
final PrebuiltLinuxApp linuxApp = PrebuiltLinuxApp(executable: 'foo');
|
||||
@@ -166,8 +165,7 @@ void main() {
|
||||
fileSystem: fs,
|
||||
directory: dir,
|
||||
logger: BufferLogger.test()
|
||||
),
|
||||
useImplicitPubspecResolution: true,
|
||||
)
|
||||
).devices(), <Device>[]);
|
||||
});
|
||||
|
||||
@@ -185,8 +183,7 @@ void main() {
|
||||
fileSystem: fs,
|
||||
directory: dir,
|
||||
logger: BufferLogger.test()
|
||||
),
|
||||
useImplicitPubspecResolution: true,
|
||||
)
|
||||
).devices(), <Device>[]);
|
||||
});
|
||||
|
||||
@@ -210,8 +207,7 @@ void main() {
|
||||
fileSystem: fs,
|
||||
directory: dir,
|
||||
logger: BufferLogger.test()
|
||||
),
|
||||
useImplicitPubspecResolution: true,
|
||||
)
|
||||
).devices(),
|
||||
hasLength(1)
|
||||
);
|
||||
@@ -240,7 +236,6 @@ void main() {
|
||||
directory: dir,
|
||||
logger: BufferLogger.test(),
|
||||
),
|
||||
useImplicitPubspecResolution: true,
|
||||
);
|
||||
|
||||
final List<Device> discoveredDevices = await discovery.discoverDevices();
|
||||
@@ -270,7 +265,6 @@ void main() {
|
||||
directory: dir,
|
||||
logger: BufferLogger.test(),
|
||||
),
|
||||
useImplicitPubspecResolution: true,
|
||||
);
|
||||
|
||||
expect(await discovery.discoverDevices(), hasLength(0));
|
||||
@@ -295,7 +289,6 @@ void main() {
|
||||
directory: dir,
|
||||
logger: BufferLogger.test(),
|
||||
),
|
||||
useImplicitPubspecResolution: true,
|
||||
);
|
||||
|
||||
expect(await discovery.discoverDevices(), hasLength(0));
|
||||
@@ -315,7 +308,6 @@ void main() {
|
||||
config: testConfig,
|
||||
logger: BufferLogger.test(),
|
||||
processManager: FakeProcessManager.any(),
|
||||
useImplicitPubspecResolution: true,
|
||||
).isSupportedForProject(flutterProject), true);
|
||||
});
|
||||
|
||||
@@ -325,13 +317,12 @@ void main() {
|
||||
bool bothCommandsWereExecuted = false;
|
||||
|
||||
final CustomDevice device = CustomDevice(
|
||||
config: testConfig,
|
||||
logger: BufferLogger.test(),
|
||||
processManager: FakeProcessManager.list(<FakeCommand>[
|
||||
FakeCommand(command: testConfig.uninstallCommand),
|
||||
FakeCommand(command: testConfig.installCommand, onRun: (_) => bothCommandsWereExecuted = true),
|
||||
]),
|
||||
useImplicitPubspecResolution: true,
|
||||
config: testConfig,
|
||||
logger: BufferLogger.test(),
|
||||
processManager: FakeProcessManager.list(<FakeCommand>[
|
||||
FakeCommand(command: testConfig.uninstallCommand),
|
||||
FakeCommand(command: testConfig.installCommand, onRun: (_) => bothCommandsWereExecuted = true),
|
||||
])
|
||||
);
|
||||
|
||||
expect(await device.installApp(PrebuiltLinuxApp(executable: 'exe')), true);
|
||||
@@ -393,8 +384,7 @@ void main() {
|
||||
device: CustomDevice(
|
||||
config: testConfig,
|
||||
logger: BufferLogger.test(),
|
||||
processManager: processManager,
|
||||
useImplicitPubspecResolution: true,
|
||||
processManager: processManager
|
||||
),
|
||||
appPackage: PrebuiltLinuxApp(executable: 'testexecutable'),
|
||||
logger: BufferLogger.test(),
|
||||
@@ -431,8 +421,7 @@ void main() {
|
||||
device: CustomDevice(
|
||||
config: testConfigNonForwarding,
|
||||
logger: BufferLogger.test(),
|
||||
processManager: processManager,
|
||||
useImplicitPubspecResolution: true,
|
||||
processManager: processManager
|
||||
),
|
||||
appPackage: PrebuiltLinuxApp(executable: 'testexecutable'),
|
||||
logger: BufferLogger.test(),
|
||||
@@ -497,8 +486,7 @@ void main() {
|
||||
fileSystem: fs,
|
||||
directory: configFileDir,
|
||||
logger: BufferLogger.test()
|
||||
),
|
||||
useImplicitPubspecResolution: true,
|
||||
)
|
||||
);
|
||||
|
||||
final List<Device> devices = await customDevices.discoverDevices();
|
||||
@@ -547,8 +535,7 @@ void main() {
|
||||
final CustomDevice device = CustomDevice(
|
||||
config: testConfig,
|
||||
logger: BufferLogger.test(),
|
||||
processManager: processManager,
|
||||
useImplicitPubspecResolution: true,
|
||||
processManager: processManager
|
||||
);
|
||||
|
||||
expect(device.supportsScreenshot, true);
|
||||
@@ -576,8 +563,7 @@ void main() {
|
||||
explicitScreenshotCommand: true
|
||||
),
|
||||
logger: BufferLogger.test(),
|
||||
processManager: processManager,
|
||||
useImplicitPubspecResolution: true,
|
||||
processManager: processManager
|
||||
);
|
||||
|
||||
expect(device.supportsScreenshot, false);
|
||||
@@ -595,8 +581,7 @@ void main() {
|
||||
platform: TargetPlatform.linux_x64
|
||||
),
|
||||
logger: BufferLogger.test(),
|
||||
processManager: FakeProcessManager.empty(),
|
||||
useImplicitPubspecResolution: true,
|
||||
processManager: FakeProcessManager.empty()
|
||||
);
|
||||
|
||||
expect(await device.targetPlatform, TargetPlatform.linux_x64);
|
||||
@@ -664,7 +649,6 @@ class FakeBundleBuilder extends Fake implements BundleBuilder {
|
||||
String? assetDirPath,
|
||||
Uri? nativeAssets,
|
||||
bool buildNativeAssets = true,
|
||||
required bool useImplicitPubspecResolution,
|
||||
@visibleForTesting BuildSystem? buildSystem
|
||||
}) async {}
|
||||
}
|
||||
|
||||
@@ -318,7 +318,6 @@ class FakeWebRunnerFactory implements WebRunnerFactory {
|
||||
Usage? usage,
|
||||
Analytics? analytics,
|
||||
bool machine = false,
|
||||
required bool useImplicitPubspecResolution,
|
||||
}) {
|
||||
expect(stayResident, isTrue);
|
||||
return FakeResidentRunner(
|
||||
@@ -382,7 +381,6 @@ WebDriverService setUpDriverService() {
|
||||
processManager: FakeProcessManager.any(),
|
||||
),
|
||||
dartSdkPath: 'dart',
|
||||
useImplicitPubspecResolution: true,
|
||||
);
|
||||
}
|
||||
|
||||
|
||||
@@ -149,7 +149,6 @@ void main() {
|
||||
debuggingOptions: DebuggingOptions.disabled(BuildInfo.debug),
|
||||
target: 'main.dart',
|
||||
devtoolsHandler: createNoOpHandler,
|
||||
useImplicitPubspecResolution: true,
|
||||
analytics: fakeAnalytics,
|
||||
).restart(fullRestart: true);
|
||||
expect(result.isOk, false);
|
||||
@@ -182,7 +181,6 @@ void main() {
|
||||
debuggingOptions: DebuggingOptions.disabled(BuildInfo.debug),
|
||||
target: 'main.dart',
|
||||
devtoolsHandler: createNoOpHandler,
|
||||
useImplicitPubspecResolution: true,
|
||||
reassembleHelper: (
|
||||
List<FlutterDevice?> flutterDevices,
|
||||
Map<FlutterDevice?, List<FlutterView>> viewCache,
|
||||
@@ -232,7 +230,6 @@ void main() {
|
||||
debuggingOptions: DebuggingOptions.disabled(BuildInfo.debug),
|
||||
target: 'main.dart',
|
||||
analytics: fakeAnalytics,
|
||||
useImplicitPubspecResolution: true,
|
||||
).cleanupAfterSignal();
|
||||
expect(shutdownTestingConfig.shutdownHookCalled, true);
|
||||
}, overrides: <Type, Generator>{
|
||||
@@ -261,7 +258,6 @@ void main() {
|
||||
debuggingOptions: DebuggingOptions.disabled(BuildInfo.debug),
|
||||
target: 'main.dart',
|
||||
analytics: fakeAnalytics,
|
||||
useImplicitPubspecResolution: true,
|
||||
).preExit();
|
||||
expect(shutdownTestingConfig.shutdownHookCalled, true);
|
||||
}, overrides: <Type, Generator>{
|
||||
@@ -312,7 +308,6 @@ void main() {
|
||||
devtoolsHandler: createNoOpHandler,
|
||||
stopwatchFactory: fakeStopwatchFactory,
|
||||
analytics: fakeAnalytics,
|
||||
useImplicitPubspecResolution: true,
|
||||
).restart(fullRestart: true);
|
||||
|
||||
expect(result.isOk, true);
|
||||
@@ -400,7 +395,6 @@ void main() {
|
||||
devtoolsHandler: createNoOpHandler,
|
||||
stopwatchFactory: fakeStopwatchFactory,
|
||||
analytics: fakeAnalytics,
|
||||
useImplicitPubspecResolution: true,
|
||||
reloadSourcesHelper: (
|
||||
HotRunner hotRunner,
|
||||
List<FlutterDevice?> flutterDevices,
|
||||
@@ -507,7 +501,6 @@ void main() {
|
||||
target: 'main.dart',
|
||||
devtoolsHandler: createNoOpHandler,
|
||||
analytics: fakeAnalytics,
|
||||
useImplicitPubspecResolution: true,
|
||||
);
|
||||
|
||||
await expectLater(runner.restart(fullRestart: true), throwsA(isA<Exception>().having((Exception e) => e.toString(), 'message', 'Exception: updateDevFS failed')));
|
||||
@@ -543,7 +536,6 @@ void main() {
|
||||
target: 'main.dart',
|
||||
devtoolsHandler: createNoOpHandler,
|
||||
analytics: fakeAnalytics,
|
||||
useImplicitPubspecResolution: true,
|
||||
);
|
||||
|
||||
await expectLater(runner.restart(), throwsA(isA<Exception>().having((Exception e) => e.toString(), 'message', 'Exception: updateDevFS failed')));
|
||||
@@ -597,7 +589,6 @@ void main() {
|
||||
debuggingOptions: DebuggingOptions.enabled(BuildInfo.debug),
|
||||
target: 'main.dart',
|
||||
analytics: fakeAnalytics,
|
||||
useImplicitPubspecResolution: true,
|
||||
).attach(needsFullRestart: false);
|
||||
expect(exitCode, 2);
|
||||
}, overrides: <Type, Generator>{
|
||||
@@ -636,7 +627,6 @@ void main() {
|
||||
debuggingOptions: DebuggingOptions.enabled(BuildInfo.debug),
|
||||
target: 'main.dart',
|
||||
analytics: fakeAnalytics,
|
||||
useImplicitPubspecResolution: true,
|
||||
).cleanupAtFinish();
|
||||
|
||||
expect(device1.disposed, true);
|
||||
|
||||
@@ -89,7 +89,6 @@ void main() {
|
||||
devtoolsHandler: createNoOpHandler,
|
||||
nativeAssetsBuilder: FakeHotRunnerNativeAssetsBuilder(buildRunner),
|
||||
analytics: fakeAnalytics,
|
||||
useImplicitPubspecResolution: true,
|
||||
);
|
||||
final OperationResult result = await hotRunner.restart(fullRestart: true);
|
||||
expect(result.isOk, true);
|
||||
@@ -158,7 +157,6 @@ void main() {
|
||||
devtoolsHandler: createNoOpHandler,
|
||||
nativeAssetsBuilder: FakeHotRunnerNativeAssetsBuilder(buildRunner),
|
||||
analytics: fakeAnalytics,
|
||||
useImplicitPubspecResolution: true,
|
||||
);
|
||||
expect(
|
||||
() => hotRunner.run(),
|
||||
|
||||
@@ -74,7 +74,6 @@ void main() {
|
||||
nativeAssetsBuilder: FakeHotRunnerNativeAssetsBuilder(buildRunner),
|
||||
analytics: FakeAnalytics(),
|
||||
nativeAssetsYamlFile: 'foo.yaml',
|
||||
useImplicitPubspecResolution: true,
|
||||
);
|
||||
|
||||
final int result = await residentRunner.run();
|
||||
|
||||
@@ -49,7 +49,6 @@ void main() {
|
||||
processManager: FakeProcessManager.any(),
|
||||
previewBinary: previewBinary,
|
||||
logger: BufferLogger.test(),
|
||||
useImplicitPubspecResolution: true,
|
||||
);
|
||||
|
||||
expect(await device.isLocalEmulator, false);
|
||||
@@ -85,7 +84,6 @@ void main() {
|
||||
]),
|
||||
logger: logger,
|
||||
builderFactory: () => FakeBundleBuilder(fs),
|
||||
useImplicitPubspecResolution: true,
|
||||
);
|
||||
final Directory previewDeviceCacheDir = fs
|
||||
.directory('Artifact.windowsDesktopPath.TargetPlatform.windows_x64.debug')
|
||||
@@ -123,7 +121,6 @@ void main() {
|
||||
processManager: processManager,
|
||||
platform: linuxPlatform,
|
||||
featureFlags: featureFlags,
|
||||
useImplicitPubspecResolution: true,
|
||||
);
|
||||
|
||||
final List<Device> devices = await discovery.devices();
|
||||
@@ -139,7 +136,6 @@ void main() {
|
||||
processManager: processManager,
|
||||
platform: macPlatform,
|
||||
featureFlags: featureFlags,
|
||||
useImplicitPubspecResolution: true,
|
||||
);
|
||||
|
||||
final List<Device> devices = await discovery.devices();
|
||||
@@ -157,7 +153,6 @@ void main() {
|
||||
processManager: processManager,
|
||||
platform: windowsPlatform,
|
||||
featureFlags: featureFlags,
|
||||
useImplicitPubspecResolution: true,
|
||||
);
|
||||
|
||||
final List<Device> devices = await discovery.devices();
|
||||
@@ -175,7 +170,6 @@ void main() {
|
||||
processManager: processManager,
|
||||
platform: windowsPlatform,
|
||||
featureFlags: featureFlags,
|
||||
useImplicitPubspecResolution: true,
|
||||
);
|
||||
|
||||
final List<Device> devices = await discovery.devices();
|
||||
@@ -203,8 +197,7 @@ class FakeBundleBuilder extends Fake implements BundleBuilder {
|
||||
String? depfilePath,
|
||||
String? assetDirPath,
|
||||
bool buildNativeAssets = true,
|
||||
@visibleForTesting BuildSystem? buildSystem,
|
||||
required bool useImplicitPubspecResolution,
|
||||
@visibleForTesting BuildSystem? buildSystem
|
||||
}) async {
|
||||
final Directory assetDirectory = fileSystem
|
||||
.directory(assetDirPath)
|
||||
|
||||
@@ -63,7 +63,6 @@ void main() {
|
||||
target: 'main.dart',
|
||||
analytics: fakeAnalytics,
|
||||
devtoolsHandler: createNoOpHandler,
|
||||
useImplicitPubspecResolution: true,
|
||||
);
|
||||
}, overrides: <Type, Generator>{
|
||||
Analytics: () => FakeAnalytics(),
|
||||
@@ -115,7 +114,6 @@ void main() {
|
||||
target: 'main.dart',
|
||||
devtoolsHandler: createNoOpHandler,
|
||||
analytics: globals.analytics,
|
||||
useImplicitPubspecResolution: true,
|
||||
);
|
||||
flutterDevice.generator = residentCompiler;
|
||||
|
||||
@@ -140,7 +138,6 @@ void main() {
|
||||
target: 'main.dart',
|
||||
devtoolsHandler: createNoOpHandler,
|
||||
analytics: globals.analytics,
|
||||
useImplicitPubspecResolution: true,
|
||||
);
|
||||
flutterDevice.generator = residentCompiler;
|
||||
|
||||
@@ -162,7 +159,6 @@ void main() {
|
||||
debuggingOptions: DebuggingOptions.enabled(BuildInfo.release),
|
||||
target: 'main.dart',
|
||||
devtoolsHandler: createNoOpHandler,
|
||||
useImplicitPubspecResolution: true,
|
||||
);
|
||||
flutterDevice.runColdCode = 1;
|
||||
|
||||
@@ -184,7 +180,6 @@ void main() {
|
||||
debuggingOptions: DebuggingOptions.enabled(BuildInfo.release),
|
||||
target: 'main.dart',
|
||||
devtoolsHandler: createNoOpHandler,
|
||||
useImplicitPubspecResolution: true,
|
||||
);
|
||||
flutterDevice.runColdError = Exception('BAD STUFF');
|
||||
|
||||
@@ -213,7 +208,6 @@ void main() {
|
||||
target: 'main.dart',
|
||||
devtoolsHandler: createNoOpHandler,
|
||||
analytics: globals.analytics,
|
||||
useImplicitPubspecResolution: true,
|
||||
);
|
||||
flutterDevice.generator = residentCompiler;
|
||||
|
||||
@@ -274,7 +268,6 @@ void main() {
|
||||
target: 'main.dart',
|
||||
devtoolsHandler: createNoOpHandler,
|
||||
analytics: globals.analytics,
|
||||
useImplicitPubspecResolution: true,
|
||||
);
|
||||
final Completer<DebugConnectionInfo> futureConnectionInfo = Completer<DebugConnectionInfo>.sync();
|
||||
final Completer<void> futureAppStart = Completer<void>.sync();
|
||||
@@ -416,7 +409,6 @@ void main() {
|
||||
enableDevTools: false,
|
||||
),
|
||||
analytics: fakeAnalytics,
|
||||
useImplicitPubspecResolution: true,
|
||||
);
|
||||
final Completer<DebugConnectionInfo> futureConnectionInfo = Completer<DebugConnectionInfo>.sync();
|
||||
final Completer<void> futureAppStart = Completer<void>.sync();
|
||||
@@ -481,7 +473,6 @@ void main() {
|
||||
target: 'main.dart',
|
||||
devtoolsHandler: createNoOpHandler,
|
||||
analytics: fakeAnalytics,
|
||||
useImplicitPubspecResolution: true,
|
||||
);
|
||||
final Completer<DebugConnectionInfo> futureConnectionInfo = Completer<DebugConnectionInfo>.sync();
|
||||
final Completer<void> futureAppStart = Completer<void>.sync();
|
||||
@@ -746,7 +737,6 @@ void main() {
|
||||
target: 'main.dart',
|
||||
devtoolsHandler: createNoOpHandler,
|
||||
analytics: fakeAnalytics,
|
||||
useImplicitPubspecResolution: true,
|
||||
);
|
||||
devFS.nextUpdateReport = UpdateFSReport(
|
||||
success: true,
|
||||
@@ -1091,7 +1081,6 @@ void main() {
|
||||
target: 'main.dart',
|
||||
devtoolsHandler: createNoOpHandler,
|
||||
analytics: fakeAnalytics,
|
||||
useImplicitPubspecResolution: true,
|
||||
);
|
||||
expect(otherRunner.artifactDirectory.path, contains('foobar'));
|
||||
}));
|
||||
@@ -1205,7 +1194,6 @@ flutter:
|
||||
target: 'custom_main.dart',
|
||||
devtoolsHandler: createNoOpHandler,
|
||||
analytics: fakeAnalytics,
|
||||
useImplicitPubspecResolution: true,
|
||||
);
|
||||
await residentRunner.runSourceGenerators();
|
||||
|
||||
@@ -1266,7 +1254,6 @@ flutter:
|
||||
target: 'main.dart',
|
||||
devtoolsHandler: createNoOpHandler,
|
||||
analytics: fakeAnalytics,
|
||||
useImplicitPubspecResolution: true,
|
||||
);
|
||||
flutterDevice.generator = residentCompiler;
|
||||
|
||||
@@ -1367,7 +1354,6 @@ flutter:
|
||||
debuggingOptions: DebuggingOptions.disabled(BuildInfo.release),
|
||||
target: 'main.dart',
|
||||
devtoolsHandler: createNoOpHandler,
|
||||
useImplicitPubspecResolution: true,
|
||||
);
|
||||
residentRunner.printHelp(details: true);
|
||||
|
||||
@@ -1403,7 +1389,6 @@ flutter:
|
||||
debuggingOptions: DebuggingOptions.disabled(BuildInfo.release),
|
||||
target: 'main.dart',
|
||||
devtoolsHandler: createNoOpHandler,
|
||||
useImplicitPubspecResolution: true,
|
||||
);
|
||||
residentRunner.printHelp(details: false);
|
||||
|
||||
@@ -1493,7 +1478,6 @@ flutter:
|
||||
debuggingOptions: DebuggingOptions.enabled(BuildInfo.profile, vmserviceOutFile: 'foo', enableDevTools: false),
|
||||
target: 'main.dart',
|
||||
devtoolsHandler: createNoOpHandler,
|
||||
useImplicitPubspecResolution: true,
|
||||
);
|
||||
|
||||
final Future<int?> result = residentRunner.attach();
|
||||
@@ -1539,7 +1523,6 @@ flutter:
|
||||
target: 'main.dart',
|
||||
devtoolsHandler: createNoOpHandler,
|
||||
analytics: fakeAnalytics,
|
||||
useImplicitPubspecResolution: true,
|
||||
);
|
||||
|
||||
await residentRunner.run();
|
||||
@@ -1570,7 +1553,6 @@ flutter:
|
||||
target: 'main.dart',
|
||||
devtoolsHandler: createNoOpHandler,
|
||||
analytics: fakeAnalytics,
|
||||
useImplicitPubspecResolution: true,
|
||||
);
|
||||
residentRunner.artifactDirectory.childFile('app.dill').writeAsStringSync('ABC');
|
||||
|
||||
@@ -1602,7 +1584,6 @@ flutter:
|
||||
target: 'main.dart',
|
||||
devtoolsHandler: createNoOpHandler,
|
||||
analytics: fakeAnalytics,
|
||||
useImplicitPubspecResolution: true,
|
||||
);
|
||||
residentRunner.artifactDirectory.childFile('app.dill').writeAsStringSync('ABC');
|
||||
|
||||
@@ -1635,7 +1616,6 @@ flutter:
|
||||
target: 'main.dart',
|
||||
devtoolsHandler: createNoOpHandler,
|
||||
analytics: fakeAnalytics,
|
||||
useImplicitPubspecResolution: true,
|
||||
);
|
||||
residentRunner.artifactDirectory.childFile('app.dill').writeAsStringSync('ABC');
|
||||
|
||||
@@ -1660,7 +1640,6 @@ flutter:
|
||||
target: 'main.dart',
|
||||
devtoolsHandler: createNoOpHandler,
|
||||
analytics: fakeAnalytics,
|
||||
useImplicitPubspecResolution: true,
|
||||
);
|
||||
residentRunner.artifactDirectory.childFile('app.dill').writeAsStringSync('ABC');
|
||||
|
||||
@@ -1686,7 +1665,6 @@ flutter:
|
||||
target: 'main.dart',
|
||||
devtoolsHandler: createNoOpHandler,
|
||||
analytics: fakeAnalytics,
|
||||
useImplicitPubspecResolution: true,
|
||||
);
|
||||
residentRunner.artifactDirectory.childFile('app.dill').writeAsStringSync('ABC');
|
||||
|
||||
@@ -1716,7 +1694,6 @@ flutter:
|
||||
target: 'main.dart',
|
||||
devtoolsHandler: createNoOpHandler,
|
||||
analytics: fakeAnalytics,
|
||||
useImplicitPubspecResolution: true,
|
||||
);
|
||||
residentRunner.artifactDirectory.childFile('app.dill').writeAsStringSync('ABC');
|
||||
|
||||
@@ -1740,7 +1717,6 @@ flutter:
|
||||
target: 'main.dart',
|
||||
devtoolsHandler: createNoOpHandler,
|
||||
analytics: fakeAnalytics,
|
||||
useImplicitPubspecResolution: true,
|
||||
);
|
||||
|
||||
await residentRunner.run();
|
||||
@@ -1762,7 +1738,6 @@ flutter:
|
||||
target: 'main.dart',
|
||||
devtoolsHandler: createNoOpHandler,
|
||||
analytics: fakeAnalytics,
|
||||
useImplicitPubspecResolution: true,
|
||||
);
|
||||
|
||||
await residentRunner.run();
|
||||
@@ -1786,7 +1761,6 @@ flutter:
|
||||
debuggingOptions: DebuggingOptions.enabled(BuildInfo.profile, vmserviceOutFile: 'foo'),
|
||||
devtoolsHandler: createNoOpHandler,
|
||||
target: 'main.dart',
|
||||
useImplicitPubspecResolution: true,
|
||||
);
|
||||
|
||||
await residentRunner.run();
|
||||
@@ -2168,7 +2142,6 @@ flutter:
|
||||
target: 'main.dart',
|
||||
devtoolsHandler: createNoOpHandler,
|
||||
analytics: fakeAnalytics,
|
||||
useImplicitPubspecResolution: true,
|
||||
);
|
||||
await residentRunner.cleanupAtFinish();
|
||||
|
||||
@@ -2190,7 +2163,6 @@ flutter:
|
||||
target: 'main.dart',
|
||||
devtoolsHandler: createNoOpHandler,
|
||||
analytics: fakeAnalytics,
|
||||
useImplicitPubspecResolution: true,
|
||||
);
|
||||
|
||||
(flutterDevice.devFS! as FakeDevFS).assetPathsToEvict = <String>{'asset'};
|
||||
@@ -2216,7 +2188,6 @@ flutter:
|
||||
target: 'main.dart',
|
||||
devtoolsHandler: createNoOpHandler,
|
||||
analytics: fakeAnalytics,
|
||||
useImplicitPubspecResolution: true,
|
||||
);
|
||||
|
||||
(flutterDevice.devFS! as FakeDevFS).shaderPathsToEvict = <String>{'foo.frag'};
|
||||
@@ -2239,7 +2210,6 @@ flutter:
|
||||
target: 'main.dart',
|
||||
devtoolsHandler: createNoOpHandler,
|
||||
analytics: fakeAnalytics,
|
||||
useImplicitPubspecResolution: true,
|
||||
);
|
||||
|
||||
expect(flutterDevice.devFS!.hasSetAssetDirectory, false);
|
||||
@@ -2262,7 +2232,6 @@ flutter:
|
||||
target: 'main.dart',
|
||||
devtoolsHandler: createNoOpHandler,
|
||||
analytics: fakeAnalytics,
|
||||
useImplicitPubspecResolution: true,
|
||||
);
|
||||
|
||||
(flutterDevice.devFS! as FakeDevFS).assetPathsToEvict = <String>{'asset'};
|
||||
@@ -2312,7 +2281,6 @@ flutter:
|
||||
devtoolsHandler: createNoOpHandler,
|
||||
analytics: globals.analytics,
|
||||
nativeAssetsYamlFile: 'foo.yaml',
|
||||
useImplicitPubspecResolution: true,
|
||||
);
|
||||
|
||||
final int? result = await residentRunner.run();
|
||||
|
||||
@@ -61,7 +61,6 @@ void main() {
|
||||
fs: fileSystem,
|
||||
fakeFlutterVersion: FakeFlutterVersion(),
|
||||
),
|
||||
useImplicitPubspecResolution: true,
|
||||
);
|
||||
|
||||
final Completer<DebugConnectionInfo> connectionInfoCompleter = Completer<DebugConnectionInfo>();
|
||||
@@ -92,7 +91,6 @@ void main() {
|
||||
fs: fileSystem,
|
||||
fakeFlutterVersion: FakeFlutterVersion(),
|
||||
),
|
||||
useImplicitPubspecResolution: true,
|
||||
);
|
||||
|
||||
expect(() => residentWebRunner.run(), throwsToolExit());
|
||||
@@ -118,7 +116,6 @@ void main() {
|
||||
fs: fileSystem,
|
||||
fakeFlutterVersion: FakeFlutterVersion(),
|
||||
),
|
||||
useImplicitPubspecResolution: true,
|
||||
);
|
||||
|
||||
expect(() async => residentWebRunner.run(), throwsException);
|
||||
@@ -143,7 +140,6 @@ void main() {
|
||||
fs: fileSystem,
|
||||
fakeFlutterVersion: FakeFlutterVersion(),
|
||||
),
|
||||
useImplicitPubspecResolution: true,
|
||||
);
|
||||
final Completer<DebugConnectionInfo> connectionInfoCompleter = Completer<DebugConnectionInfo>();
|
||||
unawaited(residentWebRunner.run(
|
||||
@@ -173,7 +169,6 @@ void main() {
|
||||
fs: fileSystem,
|
||||
fakeFlutterVersion: FakeFlutterVersion(),
|
||||
),
|
||||
useImplicitPubspecResolution: true,
|
||||
);
|
||||
final Completer<DebugConnectionInfo> connectionInfoCompleter = Completer<DebugConnectionInfo>();
|
||||
unawaited(residentWebRunner.run(
|
||||
|
||||
@@ -170,7 +170,6 @@ void main() {
|
||||
usage: globals.flutterUsage,
|
||||
analytics: globals.analytics,
|
||||
systemClock: globals.systemClock,
|
||||
useImplicitPubspecResolution: true,
|
||||
);
|
||||
|
||||
expect(profileResidentWebRunner.debuggingEnabled, false);
|
||||
@@ -203,7 +202,6 @@ void main() {
|
||||
usage: globals.flutterUsage,
|
||||
analytics: globals.analytics,
|
||||
systemClock: globals.systemClock,
|
||||
useImplicitPubspecResolution: true,
|
||||
);
|
||||
|
||||
expect(profileResidentWebRunner.uri, webDevFS.baseUri);
|
||||
@@ -223,7 +221,6 @@ void main() {
|
||||
usage: globals.flutterUsage,
|
||||
analytics: globals.analytics,
|
||||
systemClock: globals.systemClock,
|
||||
useImplicitPubspecResolution: true,
|
||||
);
|
||||
fakeVmServiceHost = FakeVmServiceHost(requests: <VmServiceExpectation>[]);
|
||||
flutterDevice.device = chromeDevice;
|
||||
@@ -237,7 +234,6 @@ void main() {
|
||||
usage: globals.flutterUsage,
|
||||
analytics: globals.analytics,
|
||||
systemClock: globals.systemClock,
|
||||
useImplicitPubspecResolution: true,
|
||||
);
|
||||
|
||||
expect(profileResidentWebRunner.supportsServiceProtocol, false);
|
||||
@@ -372,7 +368,6 @@ void main() {
|
||||
analytics: globals.analytics,
|
||||
systemClock: globals.systemClock,
|
||||
devtoolsHandler: createNoOpHandler,
|
||||
useImplicitPubspecResolution: true,
|
||||
);
|
||||
|
||||
expect(await residentWebRunner.run(), 0);
|
||||
@@ -400,7 +395,6 @@ void main() {
|
||||
analytics: globals.analytics,
|
||||
systemClock: globals.systemClock,
|
||||
devtoolsHandler: createNoOpHandler,
|
||||
useImplicitPubspecResolution: true,
|
||||
);
|
||||
|
||||
expect(await residentWebRunner.run(), 0);
|
||||
@@ -602,7 +596,6 @@ void main() {
|
||||
analytics: globals.analytics,
|
||||
systemClock: globals.systemClock,
|
||||
devtoolsHandler: createNoOpHandler,
|
||||
useImplicitPubspecResolution: true,
|
||||
);
|
||||
fakeVmServiceHost =
|
||||
FakeVmServiceHost(requests: kAttachExpectations.toList());
|
||||
@@ -1127,7 +1120,6 @@ void main() {
|
||||
analytics: globals.analytics,
|
||||
systemClock: globals.systemClock,
|
||||
devtoolsHandler: createNoOpHandler,
|
||||
useImplicitPubspecResolution: true,
|
||||
);
|
||||
|
||||
final Completer<DebugConnectionInfo> connectionInfoCompleter =
|
||||
@@ -1177,7 +1169,6 @@ void main() {
|
||||
analytics: globals.analytics,
|
||||
systemClock: globals.systemClock,
|
||||
devtoolsHandler: createNoOpHandler,
|
||||
useImplicitPubspecResolution: true,
|
||||
);
|
||||
|
||||
final Completer<DebugConnectionInfo> connectionInfoCompleter =
|
||||
@@ -1221,7 +1212,6 @@ void main() {
|
||||
analytics: globals.analytics,
|
||||
systemClock: globals.systemClock,
|
||||
devtoolsHandler: createNoOpHandler,
|
||||
useImplicitPubspecResolution: true,
|
||||
);
|
||||
|
||||
// Create necessary files.
|
||||
@@ -1478,7 +1468,6 @@ ResidentRunner setUpResidentRunner(
|
||||
fileSystem: globals.fs,
|
||||
logger: logger ?? BufferLogger.test(),
|
||||
devtoolsHandler: createNoOpHandler,
|
||||
useImplicitPubspecResolution: true,
|
||||
);
|
||||
}
|
||||
|
||||
|
||||
@@ -98,7 +98,6 @@ void main() {
|
||||
artifacts: Artifacts.test(),
|
||||
logger: BufferLogger.test(),
|
||||
flutterVersion: FakeFlutterVersion(),
|
||||
useImplicitPubspecResolution: true,
|
||||
);
|
||||
logLines = <String>[];
|
||||
device.getLogReader().logLines.listen(logLines.add);
|
||||
@@ -218,7 +217,6 @@ FlutterTesterDevices setUpFlutterTesterDevices() {
|
||||
processManager: FakeProcessManager.any(),
|
||||
fileSystem: MemoryFileSystem.test(),
|
||||
flutterVersion: FakeFlutterVersion(),
|
||||
useImplicitPubspecResolution: true,
|
||||
);
|
||||
}
|
||||
|
||||
|
||||
@@ -70,7 +70,6 @@ void main() {
|
||||
flutterVersion: flutterVersion,
|
||||
fileSystem: fileSystem,
|
||||
analytics: fakeAnalytics,
|
||||
useImplicitPubspecResolution: true,
|
||||
);
|
||||
await webBuilder.buildWeb(
|
||||
flutterProject,
|
||||
@@ -161,7 +160,6 @@ void main() {
|
||||
flutterVersion: flutterVersion,
|
||||
fileSystem: fileSystem,
|
||||
analytics: fakeAnalytics,
|
||||
useImplicitPubspecResolution: true,
|
||||
);
|
||||
await expectLater(
|
||||
() async => webBuilder.buildWeb(
|
||||
|
||||
@@ -183,7 +183,7 @@ void testUsingContext(
|
||||
// can provide the AlwaysFalseBotDetector in the overrides, or its own
|
||||
// BotDetector implementation in the overrides.
|
||||
BotDetector: overrides[BotDetector] ?? () => const FakeBotDetector(true),
|
||||
}, useImplicitPubspecResolution: true);
|
||||
});
|
||||
}, testOn: testOn, skip: skip);
|
||||
// We don't support "timeout"; see ../../dart_test.yaml which
|
||||
// configures all tests to have a 15 minute timeout which should
|
||||
|
||||
@@ -92,7 +92,7 @@ class Testbed {
|
||||
///
|
||||
/// `overrides` may be used to provide new context values for the single test
|
||||
/// case or override any context values from the setup.
|
||||
Future<T?> run<T>(FutureOr<T> Function() test, {Map<Type, Generator>? overrides, bool useImplicitPubspecResolution = true}) {
|
||||
Future<T?> run<T>(FutureOr<T> Function() test, {Map<Type, Generator>? overrides}) {
|
||||
final Map<Type, Generator> testOverrides = <Type, Generator>{
|
||||
..._testbedDefaults,
|
||||
// Add the initial setUp overrides
|
||||
@@ -139,7 +139,7 @@ class Testbed {
|
||||
}
|
||||
return null;
|
||||
});
|
||||
}, useImplicitPubspecResolution: useImplicitPubspecResolution);
|
||||
});
|
||||
}, createHttpClient: (SecurityContext? c) => FakeHttpClient.any());
|
||||
}
|
||||
}
|
||||
|
||||
@@ -21,7 +21,6 @@ void main() {
|
||||
processManager: FakeProcessManager.empty(),
|
||||
),
|
||||
dartSdkPath: 'dart',
|
||||
useImplicitPubspecResolution: true,
|
||||
);
|
||||
const String link = 'https://flutter.dev/to/integration-test-on-web';
|
||||
try {
|
||||
|
||||
Reference in New Issue
Block a user