flutter/packages
August dc6f94a878
refactor: Remove throwOnPluginPubspecError flag for plugin validation (#144214)
Part of #137040 and #80374

The flag `throwOnPluginPubspecError` never actually was enabled during production in #79669, but only in some dart plugin tests. And in the tests the case of the error when enabling the flag was not explicitly tested. The only thing tested was, that it is not thrown when disabled.

As explained [here](https://github.com/flutter/flutter/pull/142035#discussion_r1484237904) the only case, where this error could be thrown is, when a dart implementation and a native inline implementation are provided simultaneously. But throwing an exception there is a wrong behavior, as both can coexist in a plugin package, thus in the pubspec file.

Disabling the flag means, that the error is not thrown and not shown to the user. This is the case in production (contrary to the dart plugin tests), which acts like these plugin cases of implementations are just skipped. And this is what actually should be done.

In conclusion, I think the case of coexisting dart and native implementation in pubspec was just overlooked and therefore this error validation was introduced, which is not necessary or even valid.

For more discussion, see: https://discord.com/channels/608014603317936148/608022056616853515/1200194937791205436

  - This is tricky: I already added a test in #142035, which finally complies with the other tests, by removing the flag. So I think it falls in the category of "remove dead code".
  - Theoretically this is a breaking change, as removing / altering some tests. But the flag actually was never valid or used, so IDK. But this may not does fall in the category of "contributed tests".
2024-03-07 23:04:08 +00:00
..
flutter Fixed -> DropdownMenu throws exception when it is in any scrollable l… (#140566) 2024-03-07 20:46:03 +00:00
flutter_driver [Impeller] measure GPU memory usage. (#144575) 2024-03-06 20:17:31 +00:00
flutter_goldens Fix Small Typo in Skia_Client Doc Comment (#144490) 2024-03-04 18:24:13 +00:00
flutter_localizations CalendarDatePicker doesn't announce selected date on desktop (#143583) 2024-02-21 08:59:24 +00:00
flutter_test [flutter_test] Use defaultTargetPlatform for key events simulation (#143579) 2024-03-07 16:08:20 +00:00
flutter_tools refactor: Remove throwOnPluginPubspecError flag for plugin validation (#144214) 2024-03-07 23:04:08 +00:00
flutter_web_plugins Upgrade leak_tracker. (#143236) 2024-02-09 14:41:22 -08:00
fuchsia_remote_debug_protocol Upgrade leak_tracker. (#143236) 2024-02-09 14:41:22 -08:00
integration_test Use robolectric/AndroidJUnit4 for integration test tests (#144348) 2024-02-29 00:57:24 +00:00
analysis_options.yaml Unify analysis options (#108462) 2022-07-28 09:07:49 -07:00