Clean up dependency pins and update all packages (#91109)
This commit is contained in:
@@ -11,46 +11,48 @@
|
||||
/// the SDK pins to an exact version.
|
||||
///
|
||||
/// Before adding a new Dart Team owned dependency to this set, please clear with natebosch@
|
||||
/// or jakemac53@. For other packages please contact hixie@ or zanderso@ .
|
||||
/// or jakemac53@. For other packages please contact hixie@ or zanderso@.
|
||||
///
|
||||
/// You may remove entries from this list at any time, but once removed they must stay removed
|
||||
/// unless the additions are cleared as described above.
|
||||
const Set<String> kCorePackageAllowList = <String>{
|
||||
'characters',
|
||||
'clock',
|
||||
'collection',
|
||||
'fake_async',
|
||||
'file',
|
||||
'frontend_server_client',
|
||||
'intl',
|
||||
'meta',
|
||||
'path',
|
||||
'stack_trace',
|
||||
'test',
|
||||
'test_api',
|
||||
'typed_data',
|
||||
'vector_math',
|
||||
'vm_service',
|
||||
'webdriver',
|
||||
// Please keep this list in alphabetical order.
|
||||
'_fe_analyzer_shared',
|
||||
'analyzer',
|
||||
'archive',
|
||||
'args',
|
||||
'async',
|
||||
'boolean_selector',
|
||||
'characters',
|
||||
'charcode',
|
||||
'cli_util',
|
||||
'clock',
|
||||
'collection',
|
||||
'convert',
|
||||
'coverage',
|
||||
'crypto',
|
||||
'fake_async',
|
||||
'file',
|
||||
'flutter',
|
||||
'flutter_driver',
|
||||
'flutter_localizations',
|
||||
'flutter_test',
|
||||
'frontend_server_client',
|
||||
'glob',
|
||||
'http_multi_server',
|
||||
'http_parser',
|
||||
'integration_test',
|
||||
'intl',
|
||||
'io',
|
||||
'js',
|
||||
'logging',
|
||||
'matcher',
|
||||
'meta',
|
||||
'mime',
|
||||
'node_preamble',
|
||||
'package_config',
|
||||
'pedantic',
|
||||
'path',
|
||||
'pedantic', // resolving the pin on `test` should remove this, see https://github.com/dart-lang/test/issues/1594
|
||||
'pool',
|
||||
'pub_semver',
|
||||
'shelf',
|
||||
@@ -60,18 +62,20 @@ const Set<String> kCorePackageAllowList = <String>{
|
||||
'source_map_stack_trace',
|
||||
'source_maps',
|
||||
'source_span',
|
||||
'stack_trace',
|
||||
'stream_channel',
|
||||
'string_scanner',
|
||||
'sync_http',
|
||||
'term_glyph',
|
||||
'test',
|
||||
'test_api',
|
||||
'test_core',
|
||||
'typed_data',
|
||||
'vector_math',
|
||||
'vm_service',
|
||||
'watcher',
|
||||
'web_socket_channel',
|
||||
'webdriver',
|
||||
'webkit_inspection_protocol',
|
||||
'yaml',
|
||||
'flutter',
|
||||
'flutter_driver',
|
||||
'flutter_localizations',
|
||||
'flutter_test',
|
||||
'integration_test'
|
||||
};
|
||||
|
||||
@@ -1344,47 +1344,39 @@ Future<void> _checkConsumerDependencies() async {
|
||||
print(result.stderr as Object);
|
||||
exit(result.exitCode);
|
||||
}
|
||||
final Set<String> dependencySet = <String>{};
|
||||
final Set<String> dependencies = <String>{};
|
||||
for (final String line in result.stdout.toString().split('\n')) {
|
||||
if (!line.contains('->')) {
|
||||
continue;
|
||||
}
|
||||
final List<String> parts = line.split('->');
|
||||
final String name = parts[0].trim();
|
||||
dependencySet.add(name);
|
||||
dependencies.add(name);
|
||||
}
|
||||
final List<String> dependencies = dependencySet.toList()
|
||||
..sort();
|
||||
final List<String> disallowed = <String>[];
|
||||
final StreamController<Digest> controller = StreamController<Digest>();
|
||||
final ByteConversionSink hasher = sha256.startChunkedConversion(controller.sink);
|
||||
for (final String dependency in dependencies) {
|
||||
hasher.add(utf8.encode(dependency));
|
||||
if (!kCorePackageAllowList.contains(dependency)) {
|
||||
disallowed.add(dependency);
|
||||
}
|
||||
}
|
||||
hasher.close();
|
||||
final Digest digest = await controller.stream.last;
|
||||
final String signature = base64.encode(digest.bytes);
|
||||
|
||||
// Do not change this signature without following the directions in
|
||||
// dev/bots/allowlist.dart
|
||||
const String kExpected = 'vET/prkUbnIkuST0BZfUYQ+Go2N+CysKnVrKeQQTglo=';
|
||||
final Set<String> removed = kCorePackageAllowList.difference(dependencies);
|
||||
final Set<String> added = dependencies.difference(kCorePackageAllowList);
|
||||
|
||||
if (disallowed.isNotEmpty) {
|
||||
String plural(int n, String s, String p) => n == 1 ? s : p;
|
||||
|
||||
if (added.isNotEmpty) {
|
||||
exitWithError(<String>[
|
||||
'Warning: transitive closure contained non-allowlisted packages:',
|
||||
'${disallowed..join(', ')}',
|
||||
'See dev/bots/allowlist.dart for instructions on how to update the package allowlist.',
|
||||
'The transitive closure of package dependencies contains ${plural(added.length, "a non-allowlisted package", "non-allowlisted packages")}:',
|
||||
' ${added.join(', ')}',
|
||||
'We strongly desire to keep the number of dependencies to a minimum and',
|
||||
'therefore would much prefer not to add new dependencies.',
|
||||
'See dev/bots/allowlist.dart for instructions on how to update the package',
|
||||
'allowlist if you nonetheless believe this is a necessary addition.',
|
||||
]);
|
||||
}
|
||||
|
||||
if (signature != kExpected) {
|
||||
if (removed.isNotEmpty) {
|
||||
exitWithError(<String>[
|
||||
'Warning: transitive closure sha256 does not match expected signature.',
|
||||
'See dev/bots/allowlist.dart for instructions on how to update the package allowlist.',
|
||||
'$signature != $kExpected',
|
||||
'Excellent news! ${plural(removed.length, "A package dependency has been removed!", "Multiple package dependencies have been removed!")}',
|
||||
' ${removed.join(', ')}',
|
||||
'To make sure we do not accidentally add ${plural(removed.length, "this dependency", "these dependencies")} back in the future,',
|
||||
'please remove ${plural(removed.length, "this", "these")} packages from the allow-list in dev/bots/allowlist.dart.',
|
||||
'Thanks!',
|
||||
]);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -17,14 +17,14 @@ dependencies:
|
||||
test: 1.17.12
|
||||
|
||||
_discoveryapis_commons: 1.0.2 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade"
|
||||
_fe_analyzer_shared: 26.0.0 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade"
|
||||
analyzer: 2.3.0 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade"
|
||||
archive: 3.1.4 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade"
|
||||
_fe_analyzer_shared: 27.0.0 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade"
|
||||
analyzer: 2.4.0 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade"
|
||||
archive: 3.1.5 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade"
|
||||
async: 2.8.2 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade"
|
||||
boolean_selector: 2.1.0 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade"
|
||||
charcode: 1.3.1 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade"
|
||||
checked_yaml: 2.0.1 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade"
|
||||
cli_util: 0.3.3 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade"
|
||||
cli_util: 0.3.4 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade"
|
||||
collection: 1.15.0 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade"
|
||||
convert: 3.0.1 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade"
|
||||
coverage: 1.0.3 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade"
|
||||
@@ -32,7 +32,7 @@ dependencies:
|
||||
file: 6.1.2 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade"
|
||||
frontend_server_client: 2.1.2 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade"
|
||||
gcloud: 0.8.3 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade"
|
||||
glob: 2.0.1 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade"
|
||||
glob: 2.0.2 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade"
|
||||
googleapis: 3.0.0 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade"
|
||||
googleapis_auth: 1.1.0 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade"
|
||||
http: 0.13.3 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade"
|
||||
@@ -64,7 +64,7 @@ dependencies:
|
||||
test_core: 0.4.2 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade"
|
||||
typed_data: 1.3.0 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade"
|
||||
vm_service: 7.3.0 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade"
|
||||
watcher: 1.0.0 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade"
|
||||
watcher: 1.0.1 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade"
|
||||
web_socket_channel: 2.1.0 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade"
|
||||
webkit_inspection_protocol: 1.0.0 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade"
|
||||
yaml: 3.1.0 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade"
|
||||
@@ -72,4 +72,4 @@ dependencies:
|
||||
dev_dependencies:
|
||||
test_api: 0.4.3
|
||||
|
||||
# PUBSPEC CHECKSUM: e039
|
||||
# PUBSPEC CHECKSUM: 793f
|
||||
|
||||
Reference in New Issue
Block a user