[flutter_plugin_tools] Fix federated safety check (#4368)

The new safety check doesn't allow simple platform-interface-only
changes because it doesn't actually check that a non-interface package
is actually modified before failing it for a modified platform
interface.

This fixes that, and adds a test case covering it.
This commit is contained in:
stuartmorgan
2021-09-21 15:03:58 -04:00
committed by GitHub
parent 1b95825c76
commit 3e7ec17a0e
2 changed files with 48 additions and 0 deletions

View File

@ -135,6 +135,13 @@ class FederationSafetyCheckCommand extends PackageLoopingCommand {
return PackageResult.success();
}
final List<String> changedPackageFiles =
_changedDartFiles[package.directory.basename] ?? <String>[];
if (changedPackageFiles.isEmpty) {
print('No Dart changes.');
return PackageResult.success();
}
// If the change would be flagged, but it appears to be a mass change
// rather than a plugin-specific change, allow it with a warning.
//