[flutter_plugin_tools] Add a new 'make-deps-path-based' command (#4575)

Adds a new command that adds `dependency_overrides` to any packages in the repository that depend on a list of target packages, including an option to target packages that will publish a non-breaking change in a given diff.

Adds a new CI step that uses the above in conjunction with a new `--run-on-dirty-packages` to adjust the dependencies of anything in the repository that uses a to-be-published package and then re-run analysis on just those packages. This will allow us to catch in presubmit any changes that are not breaking from a semver standpoint, but will break us due to our strict analysis in CI.

Fixes https://github.com/flutter/flutter/issues/89862
This commit is contained in:
stuartmorgan
2021-12-04 12:43:13 -05:00
committed by GitHub
parent b25b31427a
commit 5dc663274a
15 changed files with 744 additions and 23 deletions

View File

@ -463,10 +463,8 @@ ${indentation}The first version listed in CHANGELOG.md is $fromChangeLog.
}
Pubspec? _tryParsePubspec(RepositoryPackage package) {
final File pubspecFile = package.pubspecFile;
try {
final Pubspec pubspec = Pubspec.parse(pubspecFile.readAsStringSync());
final Pubspec pubspec = package.parsePubspec();
return pubspec;
} on Exception catch (exception) {
printError('${indentation}Failed to parse `pubspec.yaml`: $exception}');