Skip to content

Commit e5b78fe

Browse files
authored
Remove deprecated --[no-]-disable-dds (flutter#172791)
Closes flutter#150279. Made a warning in flutter#172595 and cherry-picked into the next beta (will be stable) as flutter#172790.
1 parent 55269c5 commit e5b78fe

File tree

2 files changed

+1
-72
lines changed

2 files changed

+1
-72
lines changed

packages/flutter_tools/lib/src/runner/flutter_command.dart

Lines changed: 1 addition & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -596,29 +596,7 @@ abstract class FlutterCommand extends Command<void> {
596596
);
597597
}
598598

599-
late final bool enableDds = () {
600-
var ddsEnabled = false;
601-
if (argResults?.wasParsed('disable-dds') ?? false) {
602-
if (argResults?.wasParsed('dds') ?? false) {
603-
throwToolExit(
604-
'The "--[no-]dds" and "--[no-]disable-dds" arguments are mutually exclusive. Only specify "--[no-]dds".',
605-
);
606-
}
607-
ddsEnabled = !boolArg('disable-dds');
608-
if (ddsEnabled) {
609-
globals.printWarning(
610-
'${globals.logger.terminal.warningMark} The "--no-disable-dds" argument is deprecated and redundant, and should be omitted.',
611-
);
612-
} else {
613-
globals.printWarning(
614-
'${globals.logger.terminal.warningMark} The "--disable-dds" argument is deprecated. Use "--no-dds" instead.',
615-
);
616-
}
617-
} else {
618-
ddsEnabled = boolArg('dds');
619-
}
620-
return ddsEnabled;
621-
}();
599+
late final bool enableDds = boolArg('dds');
622600

623601
bool get _hostVmServicePortProvided =>
624602
(argResults?.wasParsed(vmServicePortOption) ?? false) ||

packages/flutter_tools/test/general.shard/runner/flutter_command_test.dart

Lines changed: 0 additions & 49 deletions
Original file line numberDiff line numberDiff line change
@@ -727,55 +727,6 @@ void main() {
727727
},
728728
);
729729

730-
testUsingContext(
731-
'dds options --disable-dds works, but is deprecated',
732-
() async {
733-
final ddsCommand = FakeDdsCommand();
734-
final CommandRunner<void> runner = createTestCommandRunner(ddsCommand);
735-
await runner.run(<String>['test', '--disable-dds']);
736-
expect(ddsCommand.enableDds, isFalse);
737-
expect(logger.warningText, contains('"--disable-dds" argument is deprecated'));
738-
},
739-
overrides: <Type, Generator>{
740-
FileSystem: () => fileSystem,
741-
Logger: () => logger,
742-
ProcessManager: () => processManager,
743-
},
744-
);
745-
746-
testUsingContext(
747-
'dds options --no-disable-dds',
748-
() async {
749-
final ddsCommand = FakeDdsCommand();
750-
final CommandRunner<void> runner = createTestCommandRunner(ddsCommand);
751-
await runner.run(<String>['test', '--no-disable-dds']);
752-
expect(ddsCommand.enableDds, isTrue);
753-
expect(
754-
logger.warningText,
755-
contains('"--no-disable-dds" argument is deprecated and redundant'),
756-
);
757-
},
758-
overrides: <Type, Generator>{
759-
FileSystem: () => fileSystem,
760-
Logger: () => logger,
761-
ProcessManager: () => processManager,
762-
},
763-
);
764-
765-
testUsingContext(
766-
'dds options --dds --disable-dds',
767-
() async {
768-
final ddsCommand = FakeDdsCommand();
769-
final CommandRunner<void> runner = createTestCommandRunner(ddsCommand);
770-
await runner.run(<String>['test', '--dds', '--disable-dds']);
771-
expect(() => ddsCommand.enableDds, throwsToolExit());
772-
},
773-
overrides: <Type, Generator>{
774-
FileSystem: () => fileSystem,
775-
ProcessManager: () => processManager,
776-
},
777-
);
778-
779730
group('findTargetDevice', () {
780731
final device1 = FakeDevice('device1', 'device1');
781732
final device2 = FakeDevice('device2', 'device2');

0 commit comments

Comments
 (0)