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:
parent
1b234858f2
commit
e0cd56b52b
@ -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',
|
||||
);
|
||||
|
@ -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');
|
||||
|
Loading…
x
Reference in New Issue
Block a user