Don't pin package:macros (#148087)

Full context https://github.com/flutter/flutter/issues/148004

TL;DR

1. Because `package:macros` depends on `package:_macros` via [a Dart SDK
dependency](https://github.com/dart-lang/sdk/blob/main/pkg/macros/pubspec.yaml#L13);
and
2. `package:macros` exactly pins `package:_macros`; and
3. Each new version of `package:macros` will increment its exact pin of
`package:_macros`
([comment](https://github.com/flutter/flutter/issues/148004#issuecomment-2103099893));
and
4. The [flutter/flutter](https://github.com/flutter/flutter) repository
exactly pins the Dart SDK (via its exact pin on the
[flutter/engine](https://github.com/flutter/engine) repository

Therefore, the [flutter/flutter](https://github.com/flutter/flutter)
repository effectively pins both `package:macros` and `package:_macros`
already (as in, there exists only a single version of each that pub will
successfully be able to solve within the context of a particular Flutter
SDK).

Therefore, it is safe for
[flutter/flutter](https://github.com/flutter/flutter) repository to
*not* pin `package:macros`, which will allow engine -> framework rolls
that contain a new Dart SDK that contains a new `package:_macros`
version to land automatically, provided all tests pass.
This commit is contained in:
Christopher Fujino
2024-05-09 16:28:49 -07:00
committed by GitHub
parent e1e742ac35
commit 730d6d44b7
40 changed files with 42 additions and 78 deletions

View File

@@ -36,4 +36,7 @@ const Map<String, String> kManuallyPinnedDependencies = <String, String>{
/// of pinned packages added to each pubspec.yaml.
const List<String> kExplicitlyExcludedPackages = <String>[
'_macros', // Synthetic dependency for macros package, which isn't published.
// This is effectively pinned via the Dart SDK pin, see
// https://github.com/flutter/flutter/issues/148004 for more context.
'macros',
];

View File

@@ -87,7 +87,6 @@ dependencies:
http_parser: 4.0.2 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade"
io: 1.0.4 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade"
json_rpc_2: 3.0.2 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade"
macros: 0.1.0-main.3 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade"
matcher: 0.12.16+1 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade"
petitparser: 6.0.2 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade"
platform: 3.1.4 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade"
@@ -121,4 +120,4 @@ dartdoc:
# Exclude this package from the hosted API docs.
nodoc: true
# PUBSPEC CHECKSUM: ac14
# PUBSPEC CHECKSUM: d60f