Move explicit package dependencies to a feature flag (#158016)

Closes https://github.com/flutter/flutter/issues/158012.

This is (effectively) a user-facing NOP, which is exchanging an
on-by-default command-line argument (`--implicit-pubspec-resolution`)
for an off-by-default global feature flag
(`explicit-package-dependencies`). It matches the mental model better,
is less painstaking to maintain and feed throughout, and will be easier
to globally flip on/off in a future PR.

---------

Co-authored-by: Andrew Kolos <andrewrkolos@gmail.com>
This commit is contained in:
Matan Lurey
2024-11-13 18:33:34 -08:00
committed by GitHub
parent 9ac9049d09
commit 125b4e945e
65 changed files with 224 additions and 436 deletions

View File

@@ -1770,7 +1770,6 @@ Run 'flutter -h' (or 'flutter <command> -h') for available flutter commands and
projectDir: project.directory,
packageConfigPath: packageConfigPath(),
generateDartPluginRegistry: true,
useImplicitPubspecResolution: globalResults!.flag(FlutterGlobalOptions.kImplicitPubspecResolution),
);
await pub.get(
@@ -1793,7 +1792,6 @@ Run 'flutter -h' (or 'flutter <command> -h') for available flutter commands and
}
await project.regeneratePlatformSpecificTooling(
allowedPlugins: allowedPlugins,
useImplicitPubspecResolution: boolArg(FlutterGlobalOptions.kImplicitPubspecResolution, global: true),
);
if (reportNullSafety) {
await _sendNullSafetyAnalyticsEvents(project);