Skip to content

Conversation

@stuartmorgan-g
Copy link
Collaborator

Updates the task queue implementation across all supporting generators to use one task queue for an entire host API, rather than one per method, so that multiple methods using task queues will have ordering guarantees amongst them. Also changes the Obj-C implementation to no-op on macOS instead of failing to compile, so that shared iOS/macOS code can use task queues on iOS without breaking macOS. (We could deliberately add a compile error with a clear error message in a macOS ifdef if we get reports of user confusion in the future, but my expectation is that no-op is the best option for most people.)

Related changes:

  • Adds integration testing that task queues work, instead of just that the generator step succeeds.
    • For platforms that don't support task queues, they are still included in the integration test to ensure that
    • I removed the now-vestigial background_platform_channels.dart.
  • Adds Swift support, since it was easier to add than to skip it in the tests.

Fixes flutter/flutter#162624
Fixes flutter/flutter#111512

Pre-launch Checklist

Copy link
Contributor

@tarrinneal tarrinneal left a comment

Choose a reason for hiding this comment

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

Looks good. I know we discussed the breaking change comment before, but I wanted to check again. A couple nits

@@ -1,3 +1,9 @@
## 24.2.0
Copy link
Contributor

Choose a reason for hiding this comment

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

This could be a breaking change couldn't it? I know that the old behavior was essentially just "wrong", but this could "break" what used to be unintentionally correct

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

The old behavior had undefined ordering, and one of the possible orderings was the one that this will guarantee. So any code that reliably behaved correctly still will, because this is one of the orderings it must have handled.

@stuartmorgan-g stuartmorgan-g added the autosubmit Merge PR when tree becomes green via auto submit App label Feb 15, 2025
@auto-submit auto-submit bot merged commit d3a9dea into flutter:main Feb 15, 2025
83 checks passed
engine-flutter-autoroll added a commit to engine-flutter-autoroll/flutter that referenced this pull request Feb 17, 2025
github-merge-queue bot pushed a commit to flutter/flutter that referenced this pull request Feb 17, 2025
flutter/packages@625023a...8542af3

2025-02-15 [email protected] [various] Enable `permissive-` for
Windows plugin examples (flutter/packages#8636)
2025-02-15 [email protected] [pigeon] Update task queue handling
(flutter/packages#8627)
2025-02-14 [email protected] Update CODEOWNERS
(flutter/packages#8628)
2025-02-14 [email protected]
[flutter_adaptive_scaffold] Fix some memory leaks
(flutter/packages#8546)
2025-02-14 [email protected] [camera] Fix crash when
setting activeFormat on FLTCaptureDevice (flutter/packages#8630)
2025-02-13 [email protected] [camera] Remove remaining
OCMock usage in tests (flutter/packages#8624)
2025-02-13 [email protected]
[webview_flutter_wkwebview] Change callback methods with a non-null
return type to non-null (flutter/packages#8564)
2025-02-12 [email protected]
[google_sign_in_ios] Adds Swift Package Manager support
(flutter/packages#7356)
2025-02-12 [email protected] [camera_avfoundation] Migrate
tests to Swift - part 1 (flutter/packages#8603)
2025-02-12 [email protected] [video_player]
Re-enables `asset videos live stream duration != 0` test for Android
(flutter/packages#8610)
2025-02-12 [email protected]
[go_router_builder] Add support for `TypedStatefulShellBranch`'s
`preload` (flutter/packages#8587)
2025-02-12 [email protected] [local_auth_darwin] Fix test name for
clarity (flutter/packages#8499)
2025-02-11 [email protected] [ci] Manually roll master, set -Xmx4G
(flutter/packages#8586)
2025-02-11 49699333+dependabot[bot]@users.noreply.github.com
[dependabot]: Bump the gradle-plugin group across 4 directories with 1
update (flutter/packages#8551)
2025-02-10 [email protected] [pigeon] Add
errors for ProxyAPI callback methods and null instances when reading in
a ProxyApiBaseCodec (flutter/packages#8567)
2025-02-10 [email protected]
[shared_preferences]Fix : SetState returning future
(flutter/packages#8398)
2025-02-10 [email protected] [various] Add deprecation notices to
READMEs (flutter/packages#8598)
2025-02-10 [email protected] [camera] Remove OCMock from
CameraSettingsTests, CameraMethodChannelTests and
CameraSessionPresetsTests (flutter/packages#8592)
2025-02-10 [email protected] [camera] Remove OCMock from
FLTCamPhotoCaptureTests, FLTSavePhotoDelegateTests and StreamingTests
(flutter/packages#8590)
2025-02-07 [email protected] [go_router]
Add `preload` parameter to `StatefulShellBranchData.$branch`
(flutter/packages#8545)
2025-02-07 [email protected] [video_player_avfoundation] iOS
platform view support (flutter/packages#8237)

If this roll has caused a breakage, revert this CL and stop the roller
using the controls here:
https://autoroll.skia.org/r/flutter-packages-flutter-autoroll
Please CC [email protected] on the revert to ensure that a
human
is aware of the problem.

To file a bug in Flutter:
https://github.com/flutter/flutter/issues/new/choose

To report a problem with the AutoRoller itself, please file a bug:
https://issues.skia.org/issues/new?component=1389291&template=1850622

Documentation for the AutoRoller is here:
https://skia.googlesource.com/buildbot/+doc/main/autoroll/README.md
androidseb pushed a commit to androidseb/packages that referenced this pull request Jun 8, 2025
Updates the task queue implementation across all supporting generators to use one task queue for an entire host API, rather than one per method, so that multiple methods using task queues will have ordering guarantees amongst them. Also changes the Obj-C implementation to no-op on macOS instead of failing to compile, so that shared iOS/macOS code can use task queues on iOS without breaking macOS. (We could deliberately add a compile error with a clear error message in a macOS ifdef if we get reports of user confusion in the future, but my expectation is that no-op is the best option for most people.)

Related changes:
- Adds integration testing that task queues work, instead of just that the generator step succeeds.
  - For platforms that don't support task queues, they are still included in the integration test to ensure that 
  - I removed the now-vestigial background_platform_channels.dart.
- Adds Swift support, since it was easier to add than to skip it in the tests.

Fixes flutter/flutter#162624
Fixes flutter/flutter#111512
FMorschel pushed a commit to FMorschel/packages that referenced this pull request Jun 9, 2025
Updates the task queue implementation across all supporting generators to use one task queue for an entire host API, rather than one per method, so that multiple methods using task queues will have ordering guarantees amongst them. Also changes the Obj-C implementation to no-op on macOS instead of failing to compile, so that shared iOS/macOS code can use task queues on iOS without breaking macOS. (We could deliberately add a compile error with a clear error message in a macOS ifdef if we get reports of user confusion in the future, but my expectation is that no-op is the best option for most people.)

Related changes:
- Adds integration testing that task queues work, instead of just that the generator step succeeds.
  - For platforms that don't support task queues, they are still included in the integration test to ensure that 
  - I removed the now-vestigial background_platform_channels.dart.
- Adds Swift support, since it was easier to add than to skip it in the tests.

Fixes flutter/flutter#162624
Fixes flutter/flutter#111512
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[pigeon] Task queues should be serial across a HostApi instance [pigeon] Support TaskQueue when using Swift

2 participants