fix: A referenced default package must be a plugin package (#152134)

Clarify that a referenced default package must also be a plugin package (one, which provides a pluginClass or a dartPluginClass).

Fixes #152037
More precisely https://github.com/flutter/flutter/issues/152037#issuecomment-2239909463.
Introduced in #137040
This commit is contained in:
August 2024-08-22 23:02:25 +02:00 committed by GitHub
parent 1b234858f2
commit e0cd56b52b
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
2 changed files with 2 additions and 2 deletions

View File

@ -1260,7 +1260,7 @@ Map<String, List<Plugin>> _resolvePluginImplementations(
}
} else {
globals.printWarning(
'Package ${plugin.name}:$platformKey references $defaultImplPluginName:$platformKey as the default plugin, but the package does not exist.\n'
'Package ${plugin.name}:$platformKey references $defaultImplPluginName:$platformKey as the default plugin, but the package does not exist, or is not a plugin package.\n'
'Ask the maintainers of ${plugin.name} to either avoid referencing a default implementation via `platforms: $platformKey: default_package: $defaultImplPluginName` '
'or create a plugin named $defaultImplPluginName.\n',
);

View File

@ -946,7 +946,7 @@ void main() {
expect(
testLogger.warningText,
'Package url_launcher:linux references url_launcher_linux:linux as the default plugin, '
'but the package does not exist.\n'
'but the package does not exist, or is not a plugin package.\n'
'Ask the maintainers of url_launcher to either avoid referencing a default implementation via `platforms: linux: default_package: url_launcher_linux` '
'or create a plugin named url_launcher_linux.\n'
'\n');