Skip to content

Conversation

@matanlurey
Copy link
Contributor

@matanlurey matanlurey commented Feb 14, 2025

Closes #162399.
Closes #163272.

refreshPluginsList is commonly called in iOS/macOS apps, more times than you expect (and load bearing); #157391.

With --explicit-package-dependencies, we no longer write (or compare) the output of .flutter-plugins. The iOS/macOS workflows required pod install output to be invalidated when plugins when change, but the logic that was being used to see if plugins changed only worked for the .flutter-plugins file format.

In the original code:

# oldPluginsFileStringContent
{"info":"This is a generated file; do not edit or check into version control.","plugins":{"ios":[{"name":"integration_test","path":"/Users/matanl/Developer/flutter/packages/integration_test/","native_build":true,"dependencies":[],"dev_dependency":false},{"name":"ios_objc_cocoapods_plugin","path":"/var/folders/qw/qw_3qd1x4kz5w975jhdq4k58007b7h/T/swift_package_manager_enabled.XrEWXS/ios_objc_cocoapods_plugin/","native_build":true,"dependencies":[],"dev_dependency":false}],"android":[{"name":"integration_test","path":"/Users/matanl/Developer/flutter/packages/integration_test/","native_build":true,"dependencies":[],"dev_dependency":false}],"macos":[],"linux":[],"windows":[],"web":[]},"dependencyGraph":[{"name":"integration_test","dependencies":[]},{"name":"ios_objc_cocoapods_plugin","dependencies":[]}],"date_created":"2025-02-13 17:01:11.023097","version":"3.30.0-1.0.pre.163","swift_package_manager_enabled":{"ios":true,"macos":false}}

# pluginsMap
{ios: [{name: integration_test, path: /Users/matanl/Developer/flutter/packages/integration_test/, native_build: true, dependencies: [], dev_dependency: false}, {name: ios_objc_cocoapods_plugin, path: /var/folders/qw/qw_3qd1x4kz5w975jhdq4k58007b7h/T/swift_package_manager_enabled.XrEWXS/ios_objc_cocoapods_plugin/, native_build: true, dependencies: [], dev_dependency: false}], android: [{name: integration_test, path: /Users/matanl/Developer/flutter/packages/integration_test/, native_build: true, dependencies: [], dev_dependency: false}], macos: [], linux: [], windows: [], web: []}

As you can see, pluginsChanged = oldPluginsFileStringContent.contains(pluginsMap.toString()); was always false, but we never knew because we'd always just fall back to using the .flutter-plugins content comparison (which always worked).

I added a test as well.

This also appears to fix #162399.

/cc @jmagman @jonahwilliams

@github-actions github-actions bot added the tool Affects the "flutter" command-line tool. See also t: labels. label Feb 14, 2025
try {
decodedJson = jsonDecode(oldPluginsFileStringContent);
if (decodedJson is Map<String, Object?>) {
final String jsonOfNewPluginsMap = jsonEncode(pluginsMap);
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

should we like ... sort it?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

In theory it is sorted here:

// Sort the plugins by name to keep ordering stable in generated files.
plugins.sort((Plugin left, Plugin right) => left.name.compareTo(right.name));

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

good enough for me

Copy link
Contributor

@jonahwilliams jonahwilliams left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@matanlurey
Copy link
Contributor Author

matanlurey commented Feb 14, 2025

I will be OOO tomorrow, so folks feel free to take over this PR if you want it submitted before Tuesday.

FlutterVersion: () => flutterVersion,
Pub: FakePubWithPrimedDeps.new,
// TODO(matanlurey): Remove as part of https://github.com/flutter/flutter/issues/160257.
// Not necessary, you can observe this bug by calling `generateLegacyPlugins: false`,
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Silly nitpick: consider adding links to #162399 and #163272 as we'll forget what "this bug" was :)

Copy link
Member

@loic-sharma loic-sharma left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Good catch, nice fix, excellent test 🚀

@matanlurey matanlurey added the autosubmit Merge PR when tree becomes green via auto submit App label Feb 18, 2025
@auto-submit auto-submit bot added this pull request to the merge queue Feb 18, 2025
Merged via the queue into flutter:master with commit 29d1e10 Feb 18, 2025
138 checks passed
@flutter-dashboard flutter-dashboard bot removed the autosubmit Merge PR when tree becomes green via auto submit App label Feb 18, 2025
engine-flutter-autoroll added a commit to engine-flutter-autoroll/packages that referenced this pull request Feb 19, 2025
engine-flutter-autoroll added a commit to engine-flutter-autoroll/packages that referenced this pull request Feb 19, 2025
engine-flutter-autoroll added a commit to engine-flutter-autoroll/packages that referenced this pull request Feb 19, 2025
engine-flutter-autoroll added a commit to engine-flutter-autoroll/packages that referenced this pull request Feb 20, 2025
engine-flutter-autoroll added a commit to engine-flutter-autoroll/packages that referenced this pull request Feb 20, 2025
engine-flutter-autoroll added a commit to engine-flutter-autoroll/packages that referenced this pull request Feb 20, 2025
engine-flutter-autoroll added a commit to engine-flutter-autoroll/packages that referenced this pull request Feb 20, 2025
auto-submit bot pushed a commit to flutter/packages that referenced this pull request Feb 20, 2025
Roll Flutter from e8f34a9 to 39b4951 (95 revisions)

flutter/flutter@e8f34a9...39b4951

2025-02-18 [email protected] Marks Windows_arm64 plugin_test_windows to be flaky (flutter/flutter#163123)
2025-02-18 [email protected] [android] use macro definition to shrink repetitive JNI code size. (flutter/flutter#163395)
2025-02-18 [email protected] Roll pub packages (flutter/flutter#163474)
2025-02-18 [email protected] [web] Cleanup everything HTML from the engine (outside html/ folder) (flutter/flutter#162840)
2025-02-18 [email protected] [Impeller] add support for rational bezier conics to Path (flutter/flutter#163282)
2025-02-18 [email protected] Change `cardTheme`, `dialogTheme`, and `tabBarTheme` type to `xxxThemeData` (flutter/flutter#157292)
2025-02-18 [email protected] Update integration test and benchmark Android .gitignore files to match the current app template (flutter/flutter#163276)
2025-02-18 [email protected] [Impeller] Don't create a redundant typography context. (flutter/flutter#163513)
2025-02-18 [email protected] Roll Dart SDK from fcef25f18e4d to 023ac80cef14 (1 revision) (flutter/flutter#163110)
2025-02-18 [email protected] update module_host_with_custom_build_v2_embedding to target android 35 and to use the latest gradle and agp versions (flutter/flutter#163542)
2025-02-18 [email protected] [Impeller] when binding to READ_FRAMEBUFFER, treat multisampled textures as single sampled. (flutter/flutter#163345)
2025-02-18 [email protected] Add missing properties to _ArcPaintPredicate. (flutter/flutter#162572)
2025-02-18 [email protected] Roll Packages from 8542af3 to cb4fb13 (4 revisions) (flutter/flutter#163544)
2025-02-18 [email protected] Remove bringup for android_display_cutout (flutter/flutter#163312)
2025-02-18 [email protected] Create VersionUtils class and unit tests and extract logic out of flutter.groovy (flutter/flutter#163166)
2025-02-18 [email protected] Invalidate `pod install` output if `.flutter-plugins-dependencies` content changes. (flutter/flutter#163275)
2025-02-18 [email protected] Replace hard coded numbers with mouse button defines (flutter/flutter#163503)
2025-02-18 [email protected] Roll Skia from 9147a9654043 to 6da10829d017 (1 revision) (flutter/flutter#163531)
2025-02-18 [email protected] Roll Skia from 92aaa4e20ea7 to 9147a9654043 (2 revisions) (flutter/flutter#163512)
2025-02-17 [email protected] Roll Skia from 71a160edc9d9 to 92aaa4e20ea7 (1 revision) (flutter/flutter#163488)
2025-02-17 [email protected] Roll Packages from 625023a to 8542af3 (21 revisions) (flutter/flutter#163484)
2025-02-17 [email protected] Roll Skia from 7e3129d5db11 to 71a160edc9d9 (1 revision) (flutter/flutter#163459)
2025-02-17 [email protected] Roll Skia from 40ce5ef20d22 to 7e3129d5db11 (1 revision) (flutter/flutter#163451)
2025-02-16 [email protected] Roll Skia from bb166c85957b to 40ce5ef20d22 (1 revision) (flutter/flutter#163403)
2025-02-15 [email protected] Roll Skia from ff94581f1f8a to bb166c85957b (1 revision) (flutter/flutter#163381)
2025-02-15 [email protected] Move DWDS initialization into the onLoadEndCallback for the DDC library bundle format (flutter/flutter#163338)
2025-02-14 [email protected] [canvaskit] Handle MakeGrContext returning null (flutter/flutter#163332)
2025-02-14 [email protected] Roll Skia from 13a3b6f34ee8 to ff94581f1f8a (1 revision) (flutter/flutter#163347)
2025-02-14 [email protected] Fix failing chrome_dev_mode tests (flutter/flutter#163346)
2025-02-14 [email protected] Adds all semantics roles (flutter/flutter#163075)
2025-02-14 [email protected] Roll Skia from 20924303cc25 to 13a3b6f34ee8 (1 revision) (flutter/flutter#163336)
2025-02-14 [email protected] [ Widget Preview ] Add experimental support for web-based widget preview environment (flutter/flutter#163154)
2025-02-14 [email protected] [Impeller] don't use glFramebufferBlit for onscreen restore. (flutter/flutter#163327)
2025-02-14 [email protected] Align web terminal messages with the VM (flutter/flutter#163268)
2025-02-14 [email protected] Manually roll customer_testing to enable rfw tests (flutter/flutter#163030)
2025-02-14 [email protected] Refactor SliverMainAxisGroup for reverse mode. (flutter/flutter#161849)
2025-02-14 [email protected] Tweaked TextContents math to avoid floating point errors (flutter/flutter#162480)
2025-02-14 [email protected] [release] Update cherry-pick CHANGELOG requirements (flutter/flutter#163318)
2025-02-14 [email protected] Roll Skia from 85722a1db585 to 20924303cc25 (2 revisions) (flutter/flutter#163293)
2025-02-14 [email protected] Roll Skia from 5a38d23ee247 to 85722a1db585 (1 revision) (flutter/flutter#163286)
2025-02-14 [email protected] Add `.flutter-plugins-dependencies` to `FlutterBuildSystem`; update logic, add tests. (flutter/flutter#163278)
2025-02-14 [email protected] Add table related semantics role (flutter/flutter#162339)
2025-02-14 [email protected] [Impeller] Call glDebugMessageControlKHR only if the KHR_debug extension is available (flutter/flutter#163273)
2025-02-14 [email protected] Roll Skia from 748415976ad1 to 5a38d23ee247 (3 revisions) (flutter/flutter#163271)
2025-02-14 [email protected] [canvaskit] Use `transferToImageBitmap` instead of `createImageBitmap` (flutter/flutter#163175)
2025-02-14 [email protected] [skwasm] Use `transferToImageBitmap` instead of `createImageBitmap` (flutter/flutter#163251)
...
engine-flutter-autoroll added a commit to engine-flutter-autoroll/packages that referenced this pull request May 20, 2025
engine-flutter-autoroll added a commit to engine-flutter-autoroll/packages that referenced this pull request May 20, 2025
engine-flutter-autoroll added a commit to engine-flutter-autoroll/packages that referenced this pull request May 21, 2025
androidseb pushed a commit to androidseb/packages that referenced this pull request Jun 8, 2025
Roll Flutter from e8f34a9 to 39b4951 (95 revisions)

flutter/flutter@e8f34a9...39b4951

2025-02-18 [email protected] Marks Windows_arm64 plugin_test_windows to be flaky (flutter/flutter#163123)
2025-02-18 [email protected] [android] use macro definition to shrink repetitive JNI code size. (flutter/flutter#163395)
2025-02-18 [email protected] Roll pub packages (flutter/flutter#163474)
2025-02-18 [email protected] [web] Cleanup everything HTML from the engine (outside html/ folder) (flutter/flutter#162840)
2025-02-18 [email protected] [Impeller] add support for rational bezier conics to Path (flutter/flutter#163282)
2025-02-18 [email protected] Change `cardTheme`, `dialogTheme`, and `tabBarTheme` type to `xxxThemeData` (flutter/flutter#157292)
2025-02-18 [email protected] Update integration test and benchmark Android .gitignore files to match the current app template (flutter/flutter#163276)
2025-02-18 [email protected] [Impeller] Don't create a redundant typography context. (flutter/flutter#163513)
2025-02-18 [email protected] Roll Dart SDK from fcef25f18e4d to 023ac80cef14 (1 revision) (flutter/flutter#163110)
2025-02-18 [email protected] update module_host_with_custom_build_v2_embedding to target android 35 and to use the latest gradle and agp versions (flutter/flutter#163542)
2025-02-18 [email protected] [Impeller] when binding to READ_FRAMEBUFFER, treat multisampled textures as single sampled. (flutter/flutter#163345)
2025-02-18 [email protected] Add missing properties to _ArcPaintPredicate. (flutter/flutter#162572)
2025-02-18 [email protected] Roll Packages from 8542af3 to cb4fb13 (4 revisions) (flutter/flutter#163544)
2025-02-18 [email protected] Remove bringup for android_display_cutout (flutter/flutter#163312)
2025-02-18 [email protected] Create VersionUtils class and unit tests and extract logic out of flutter.groovy (flutter/flutter#163166)
2025-02-18 [email protected] Invalidate `pod install` output if `.flutter-plugins-dependencies` content changes. (flutter/flutter#163275)
2025-02-18 [email protected] Replace hard coded numbers with mouse button defines (flutter/flutter#163503)
2025-02-18 [email protected] Roll Skia from 9147a9654043 to 6da10829d017 (1 revision) (flutter/flutter#163531)
2025-02-18 [email protected] Roll Skia from 92aaa4e20ea7 to 9147a9654043 (2 revisions) (flutter/flutter#163512)
2025-02-17 [email protected] Roll Skia from 71a160edc9d9 to 92aaa4e20ea7 (1 revision) (flutter/flutter#163488)
2025-02-17 [email protected] Roll Packages from 625023a to 8542af3 (21 revisions) (flutter/flutter#163484)
2025-02-17 [email protected] Roll Skia from 7e3129d5db11 to 71a160edc9d9 (1 revision) (flutter/flutter#163459)
2025-02-17 [email protected] Roll Skia from 40ce5ef20d22 to 7e3129d5db11 (1 revision) (flutter/flutter#163451)
2025-02-16 [email protected] Roll Skia from bb166c85957b to 40ce5ef20d22 (1 revision) (flutter/flutter#163403)
2025-02-15 [email protected] Roll Skia from ff94581f1f8a to bb166c85957b (1 revision) (flutter/flutter#163381)
2025-02-15 [email protected] Move DWDS initialization into the onLoadEndCallback for the DDC library bundle format (flutter/flutter#163338)
2025-02-14 [email protected] [canvaskit] Handle MakeGrContext returning null (flutter/flutter#163332)
2025-02-14 [email protected] Roll Skia from 13a3b6f34ee8 to ff94581f1f8a (1 revision) (flutter/flutter#163347)
2025-02-14 [email protected] Fix failing chrome_dev_mode tests (flutter/flutter#163346)
2025-02-14 [email protected] Adds all semantics roles (flutter/flutter#163075)
2025-02-14 [email protected] Roll Skia from 20924303cc25 to 13a3b6f34ee8 (1 revision) (flutter/flutter#163336)
2025-02-14 [email protected] [ Widget Preview ] Add experimental support for web-based widget preview environment (flutter/flutter#163154)
2025-02-14 [email protected] [Impeller] don't use glFramebufferBlit for onscreen restore. (flutter/flutter#163327)
2025-02-14 [email protected] Align web terminal messages with the VM (flutter/flutter#163268)
2025-02-14 [email protected] Manually roll customer_testing to enable rfw tests (flutter/flutter#163030)
2025-02-14 [email protected] Refactor SliverMainAxisGroup for reverse mode. (flutter/flutter#161849)
2025-02-14 [email protected] Tweaked TextContents math to avoid floating point errors (flutter/flutter#162480)
2025-02-14 [email protected] [release] Update cherry-pick CHANGELOG requirements (flutter/flutter#163318)
2025-02-14 [email protected] Roll Skia from 85722a1db585 to 20924303cc25 (2 revisions) (flutter/flutter#163293)
2025-02-14 [email protected] Roll Skia from 5a38d23ee247 to 85722a1db585 (1 revision) (flutter/flutter#163286)
2025-02-14 [email protected] Add `.flutter-plugins-dependencies` to `FlutterBuildSystem`; update logic, add tests. (flutter/flutter#163278)
2025-02-14 [email protected] Add table related semantics role (flutter/flutter#162339)
2025-02-14 [email protected] [Impeller] Call glDebugMessageControlKHR only if the KHR_debug extension is available (flutter/flutter#163273)
2025-02-14 [email protected] Roll Skia from 748415976ad1 to 5a38d23ee247 (3 revisions) (flutter/flutter#163271)
2025-02-14 [email protected] [canvaskit] Use `transferToImageBitmap` instead of `createImageBitmap` (flutter/flutter#163175)
2025-02-14 [email protected] [skwasm] Use `transferToImageBitmap` instead of `createImageBitmap` (flutter/flutter#163251)
...
FMorschel pushed a commit to FMorschel/packages that referenced this pull request Jun 9, 2025
Roll Flutter from e8f34a9 to 39b4951 (95 revisions)

flutter/flutter@e8f34a9...39b4951

2025-02-18 [email protected] Marks Windows_arm64 plugin_test_windows to be flaky (flutter/flutter#163123)
2025-02-18 [email protected] [android] use macro definition to shrink repetitive JNI code size. (flutter/flutter#163395)
2025-02-18 [email protected] Roll pub packages (flutter/flutter#163474)
2025-02-18 [email protected] [web] Cleanup everything HTML from the engine (outside html/ folder) (flutter/flutter#162840)
2025-02-18 [email protected] [Impeller] add support for rational bezier conics to Path (flutter/flutter#163282)
2025-02-18 [email protected] Change `cardTheme`, `dialogTheme`, and `tabBarTheme` type to `xxxThemeData` (flutter/flutter#157292)
2025-02-18 [email protected] Update integration test and benchmark Android .gitignore files to match the current app template (flutter/flutter#163276)
2025-02-18 [email protected] [Impeller] Don't create a redundant typography context. (flutter/flutter#163513)
2025-02-18 [email protected] Roll Dart SDK from fcef25f18e4d to 023ac80cef14 (1 revision) (flutter/flutter#163110)
2025-02-18 [email protected] update module_host_with_custom_build_v2_embedding to target android 35 and to use the latest gradle and agp versions (flutter/flutter#163542)
2025-02-18 [email protected] [Impeller] when binding to READ_FRAMEBUFFER, treat multisampled textures as single sampled. (flutter/flutter#163345)
2025-02-18 [email protected] Add missing properties to _ArcPaintPredicate. (flutter/flutter#162572)
2025-02-18 [email protected] Roll Packages from 8542af3 to cb4fb13 (4 revisions) (flutter/flutter#163544)
2025-02-18 [email protected] Remove bringup for android_display_cutout (flutter/flutter#163312)
2025-02-18 [email protected] Create VersionUtils class and unit tests and extract logic out of flutter.groovy (flutter/flutter#163166)
2025-02-18 [email protected] Invalidate `pod install` output if `.flutter-plugins-dependencies` content changes. (flutter/flutter#163275)
2025-02-18 [email protected] Replace hard coded numbers with mouse button defines (flutter/flutter#163503)
2025-02-18 [email protected] Roll Skia from 9147a9654043 to 6da10829d017 (1 revision) (flutter/flutter#163531)
2025-02-18 [email protected] Roll Skia from 92aaa4e20ea7 to 9147a9654043 (2 revisions) (flutter/flutter#163512)
2025-02-17 [email protected] Roll Skia from 71a160edc9d9 to 92aaa4e20ea7 (1 revision) (flutter/flutter#163488)
2025-02-17 [email protected] Roll Packages from 625023a to 8542af3 (21 revisions) (flutter/flutter#163484)
2025-02-17 [email protected] Roll Skia from 7e3129d5db11 to 71a160edc9d9 (1 revision) (flutter/flutter#163459)
2025-02-17 [email protected] Roll Skia from 40ce5ef20d22 to 7e3129d5db11 (1 revision) (flutter/flutter#163451)
2025-02-16 [email protected] Roll Skia from bb166c85957b to 40ce5ef20d22 (1 revision) (flutter/flutter#163403)
2025-02-15 [email protected] Roll Skia from ff94581f1f8a to bb166c85957b (1 revision) (flutter/flutter#163381)
2025-02-15 [email protected] Move DWDS initialization into the onLoadEndCallback for the DDC library bundle format (flutter/flutter#163338)
2025-02-14 [email protected] [canvaskit] Handle MakeGrContext returning null (flutter/flutter#163332)
2025-02-14 [email protected] Roll Skia from 13a3b6f34ee8 to ff94581f1f8a (1 revision) (flutter/flutter#163347)
2025-02-14 [email protected] Fix failing chrome_dev_mode tests (flutter/flutter#163346)
2025-02-14 [email protected] Adds all semantics roles (flutter/flutter#163075)
2025-02-14 [email protected] Roll Skia from 20924303cc25 to 13a3b6f34ee8 (1 revision) (flutter/flutter#163336)
2025-02-14 [email protected] [ Widget Preview ] Add experimental support for web-based widget preview environment (flutter/flutter#163154)
2025-02-14 [email protected] [Impeller] don't use glFramebufferBlit for onscreen restore. (flutter/flutter#163327)
2025-02-14 [email protected] Align web terminal messages with the VM (flutter/flutter#163268)
2025-02-14 [email protected] Manually roll customer_testing to enable rfw tests (flutter/flutter#163030)
2025-02-14 [email protected] Refactor SliverMainAxisGroup for reverse mode. (flutter/flutter#161849)
2025-02-14 [email protected] Tweaked TextContents math to avoid floating point errors (flutter/flutter#162480)
2025-02-14 [email protected] [release] Update cherry-pick CHANGELOG requirements (flutter/flutter#163318)
2025-02-14 [email protected] Roll Skia from 85722a1db585 to 20924303cc25 (2 revisions) (flutter/flutter#163293)
2025-02-14 [email protected] Roll Skia from 5a38d23ee247 to 85722a1db585 (1 revision) (flutter/flutter#163286)
2025-02-14 [email protected] Add `.flutter-plugins-dependencies` to `FlutterBuildSystem`; update logic, add tests. (flutter/flutter#163278)
2025-02-14 [email protected] Add table related semantics role (flutter/flutter#162339)
2025-02-14 [email protected] [Impeller] Call glDebugMessageControlKHR only if the KHR_debug extension is available (flutter/flutter#163273)
2025-02-14 [email protected] Roll Skia from 748415976ad1 to 5a38d23ee247 (3 revisions) (flutter/flutter#163271)
2025-02-14 [email protected] [canvaskit] Use `transferToImageBitmap` instead of `createImageBitmap` (flutter/flutter#163175)
2025-02-14 [email protected] [skwasm] Use `transferToImageBitmap` instead of `createImageBitmap` (flutter/flutter#163251)
...
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

tool Affects the "flutter" command-line tool. See also t: labels.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Flags --explicit-package-dependencies and --enable-swift-package-manager collide [SwiftPM] Plugin not found right after adding

4 participants