Repository navigation
[camera_avfoundation] Fix Swift analyzer issue _captureSessionQueue - #13332
Merged
Merged
Conversation
Contributor
There was a problem hiding this comment.
Code Review
This pull request replaces the unused _captureSessionQueue variable with a wildcard pattern in the testFlutterChannelInitializedWhenStartingImageStream test within CameraInitRaceConditionsTests.swift. There are no review comments, and I have no feedback to provide.
LongCatIsLooong
approved these changes
Oct 19, 2026
10 of 11 tasks
auto-submit Bot
pushed a commit
that referenced
this pull request
Oct 20, 2026
I don't know why these analyzer issues are being reported one-at-a-time in CI on #13284 instead of all at once, but #13332 was only one of a few analyzer issues: ``` darwin/Tests/CameraSessionPresetsTests.swift:28:9: error: variable 'currentFormat' was never mutated; consider changing to 'let' constant var currentFormat: CaptureDeviceFormat = captureFormatMock ~~~ ^ let darwin/Tests/CameraInitRaceConditionsTests.swift:62:24: warning: immutable value '_captureSessionQueue' was never used; consider replacing with '_' or removing it [#NoUsage] 60 | 61 | func testFlutterChannelInitializedWhenStartingImageStream() { 62 | let (cameraPlugin, _captureSessionQueue) = createCameraPlugin() darwin/Tests/AvailableCamerasTests.swift:49:11: warning: variable 'requiredTypes' was never mutated; consider changing to 'let' constant [#VariableNeverMutated] 47 | telephotoCamera.position = .back 48 | 49 | var requiredTypes: [AVCaptureDevice.DeviceType] = [ darwin/Tests/AvailableCamerasTests.swift:52:11: warning: variable 'cameras' was never mutated; consider changing to 'let' constant [#VariableNeverMutated] 50 | .builtInWideAngleCamera, .builtInTelephotoCamera, .builtInUltraWideCamera, 51 | ] 52 | var cameras = [wideAngleCamera, frontFacingCamera, telephotoCamera, ultraWideCamera] darwin/Tests/AvailableCamerasTests.swift:86:11: warning: variable 'requiredTypes' was never mutated; consider changing to 'let' constant [#VariableNeverMutated] 84 | frontFacingCamera.position = .front 85 | 86 | var requiredTypes: [AVCaptureDevice.DeviceType] = [ darwin/Tests/AvailableCamerasTests.swift:118:11: warning: variable 'requiredTypes' was never mutated; consider changing to 'let' constant [#VariableNeverMutated] 116 | unspecifiedCamera.position = .unspecified 117 | 118 | var requiredTypes: [AVCaptureDevice.DeviceType] = [ darwin/Tests/CameraOrientationTests.swift:120:14: warning: weak variable 'weakDevice' was never mutated; consider changing to 'let' constant [#VariableNeverMutated::WeakMutability] 118 | let captureSessionQueue = DispatchQueue(label: "capture_session_queue") 119 | weak var weakPlugin: CameraPlugin? 120 | weak var weakDevice = mockDevice darwin/Tests/CameraOrientationTests.swift:157:14: warning: weak variable 'weakEventAPI' was never mutated; consider changing to 'let' constant [#VariableNeverMutated::WeakMutability] 155 | } 156 | 157 | weak var weakEventAPI = mockEventAPI ``` This wasn't showing up in CI due to flutter/flutter#194517. ## Pre-Review Checklist **Note**: The Flutter team is currently trialing the use of [Gemini Code Assist for GitHub](https://developers.google.com/gemini-code-assist/docs/review-github-code). Comments from the `gemini-code-assist` bot should not be taken as authoritative feedback from the Flutter team. If you find its comments useful you can update your code accordingly, but if you are unsure or disagree with the feedback, please feel free to wait for a Flutter team member's review for guidance on which automated comments should be addressed. [^1]: Regular contributors who have demonstrated familiarity with the repository guidelines only need to comment if the PR is not auto-exempted by repo tooling.
bkonyi
pushed a commit
to bkonyi/flutter
that referenced
this pull request
Oct 20, 2026
flutter/packages@10a178c...618afba 2026-10-20 [email protected] [pigeon] add version checking for objective_c and jni dependencies (flutter/packages#13283) 2026-10-19 [email protected] [go_router_builder] Adopt shared analyzer helpers from source_helper: ^1.4.0 (flutter/packages#13337) 2026-10-19 [email protected] [pigeon] fix instance manager test flake (flutter/packages#13303) 2026-10-19 [email protected] [vector_graphics] Don't report a handled loading error as unhandled (flutter/packages#13315) 2026-10-19 [email protected] [file_selector_macos] Drop deprecated allowedFileTypes code path (flutter/packages#13302) 2026-10-19 [email protected] [shared_preferences_android] Update androidx.datastore:datastore to 1.2.1 (flutter/packages#13334) 2026-10-19 [email protected] [in_app_purchase_storekit] Suppress StoreKit 1 deprecation warnings (flutter/packages#13301) 2026-10-19 [email protected] [camera_avfoundation] Fix Swift analyzer issue _captureSessionQueue (flutter/packages#13332) 2026-10-19 [email protected] [material_ui] Unskip web tests that pass on CanvasKit and Skwasm: color_scheme_test, elevated_button_test, filled_button_test, icon_button_test (flutter/packages#13327) 2026-10-19 [email protected] [in_app_purchase_android] Update to Play Billing Library 9.1.0 (flutter/packages#12781) 2026-10-19 [email protected] [webview_flutter_wkwebview] Require iOS 15 / macOS 12 and drop deprecated SecTrustGetCertificateAtIndex code path (flutter/packages#13294) If this roll has caused a breakage, revert this CL and set the roller to dry run mode 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
suryaKommana2662
pushed a commit
to suryaKommana2662/flutter
that referenced
this pull request
Oct 29, 2026
flutter/packages@10a178c...618afba 2026-10-20 [email protected] [pigeon] add version checking for objective_c and jni dependencies (flutter/packages#13283) 2026-10-19 [email protected] [go_router_builder] Adopt shared analyzer helpers from source_helper: ^1.4.0 (flutter/packages#13337) 2026-10-19 [email protected] [pigeon] fix instance manager test flake (flutter/packages#13303) 2026-10-19 [email protected] [vector_graphics] Don't report a handled loading error as unhandled (flutter/packages#13315) 2026-10-19 [email protected] [file_selector_macos] Drop deprecated allowedFileTypes code path (flutter/packages#13302) 2026-10-19 [email protected] [shared_preferences_android] Update androidx.datastore:datastore to 1.2.1 (flutter/packages#13334) 2026-10-19 [email protected] [in_app_purchase_storekit] Suppress StoreKit 1 deprecation warnings (flutter/packages#13301) 2026-10-19 [email protected] [camera_avfoundation] Fix Swift analyzer issue _captureSessionQueue (flutter/packages#13332) 2026-10-19 [email protected] [material_ui] Unskip web tests that pass on CanvasKit and Skwasm: color_scheme_test, elevated_button_test, filled_button_test, icon_button_test (flutter/packages#13327) 2026-10-19 [email protected] [in_app_purchase_android] Update to Play Billing Library 9.1.0 (flutter/packages#12781) 2026-10-19 [email protected] [webview_flutter_wkwebview] Require iOS 15 / macOS 12 and drop deprecated SecTrustGetCertificateAtIndex code path (flutter/packages#13294) If this roll has caused a breakage, revert this CL and set the roller to dry run mode 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
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This wasn't showing up in CI due to flutter/flutter#194517.
Fixes flutter/flutter#194766
Pre-Review Checklist
[shared_preferences]///).If you need help, consider asking for advice on the #hackers-new channel on Discord.
Note: The Flutter team is currently trialing the use of Gemini Code Assist for GitHub. Comments from the
gemini-code-assistbot should not be taken as authoritative feedback from the Flutter team. If you find its comments useful you can update your code accordingly, but if you are unsure or disagree with the feedback, please feel free to wait for a Flutter team member's review for guidance on which automated comments should be addressed.Footnotes
Regular contributors who have demonstrated familiarity with the repository guidelines only need to comment if the PR is not auto-exempted by repo tooling. ↩ ↩2