forked from firka/flutter
Reverts "Avoid implicitly setting determineDevDependencies: true (it's not a safe operation) (#163711)" (#163762)
<!-- start_original_pr_link --> Reverts: flutter/flutter#163711 <!-- end_original_pr_link --> <!-- start_initiating_author --> Initiated by: victorsanni <!-- end_initiating_author --> <!-- start_revert_reason --> Reason for reverting: This is closing the tree. See https://ci.chromium.org/ui/p/flutter/builders/prod/Linux%20android_release_builds_exclude_dev_dependencies_test/889/overview <!-- end_revert_reason --> <!-- start_original_pr_author --> Original PR Author: matanlurey <!-- end_original_pr_author --> <!-- start_reviewers --> Reviewed By: {jonahwilliams} <!-- end_reviewers --> <!-- start_revert_body --> This change reverts the following previous change: Closes https://github.com/flutter/flutter/issues/163706. Before this PR, the macOS workflow (or, others, but only macOS had a test) would fail because it calls `refreshPluginsList` manually, and sometimes it would be `determineDevDependencies: null` and sometimes `determineDevDependencies: false`. A value of `determineDevDependencies: null` was interpreted later on as "find dev dependencies", which is not a safe operation. The only real change in this PR is `bool determineDevDependencies = false`, so omitting that parameter means we don't determine dev dependencies. Added some tests, and opted-in an integration test that was failing. <!-- end_revert_body --> Co-authored-by: auto-submit[bot] <flutter-engprod-team@google.com>
This commit is contained in:
@@ -244,8 +244,9 @@ bool _writeFlutterPluginsList(
|
||||
final String? oldPluginsFileStringContent = _readFileContent(pluginsFile);
|
||||
bool pluginsChanged = true;
|
||||
if (oldPluginsFileStringContent != null) {
|
||||
Object? decodedJson;
|
||||
try {
|
||||
final Object? decodedJson = jsonDecode(oldPluginsFileStringContent);
|
||||
decodedJson = jsonDecode(oldPluginsFileStringContent);
|
||||
if (decodedJson is Map<String, Object?>) {
|
||||
final String jsonOfNewPluginsMap = jsonEncode(pluginsMap);
|
||||
final String jsonOfOldPluginsMap = jsonEncode(decodedJson[_kFlutterPluginsPluginListKey]);
|
||||
@@ -1099,17 +1100,12 @@ void _createPlatformPluginSymlinks(
|
||||
/// dependencies declared in `pubspec.yaml`.
|
||||
///
|
||||
/// Assumes `pub get` has been executed since last change to `pubspec.yaml`.
|
||||
///
|
||||
/// Unless explicitly specified, [determineDevDependencies] is disabled by
|
||||
/// default; if set to `true`, plugins that are development-only dependencies
|
||||
/// may be labeled or, depending on the platform, omitted from metadata or
|
||||
/// platform-specific artifacts.
|
||||
Future<void> refreshPluginsList(
|
||||
FlutterProject project, {
|
||||
bool iosPlatform = false,
|
||||
bool macOSPlatform = false,
|
||||
bool forceCocoaPodsOnly = false,
|
||||
bool determineDevDependencies = false,
|
||||
bool? determineDevDependencies,
|
||||
bool? generateLegacyPlugins,
|
||||
}) async {
|
||||
final List<Plugin> plugins = await findPlugins(
|
||||
|
||||
@@ -358,12 +358,7 @@ class FlutterProject {
|
||||
if (!directory.existsSync() || isPlugin) {
|
||||
return;
|
||||
}
|
||||
await refreshPluginsList(
|
||||
this,
|
||||
iosPlatform: iosPlatform,
|
||||
macOSPlatform: macOSPlatform,
|
||||
determineDevDependencies: releaseMode ?? false,
|
||||
);
|
||||
await refreshPluginsList(this, iosPlatform: iosPlatform, macOSPlatform: macOSPlatform);
|
||||
if (androidPlatform) {
|
||||
await android.ensureReadyForPlatformSpecificTooling(deprecationBehavior: deprecationBehavior);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user