Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[camera] Remove OCMock from CameraExposureTests and CameraFocusTests #8351

Merged

Conversation

mchudy
Copy link
Contributor

@mchudy mchudy commented Dec 27, 2024

Extracted from #8342 to keep PRs smaller

  • Introduces FLTDeviceOrientationProviding and FLTCaptureDeviceControlling protocols
  • Removes OCMock.h reference from CameraExposureTests.h and CameraFocusTests.h

Pre-launch Checklist

If you need help, consider asking for advice on the #hackers-new channel on Discord.

Copy link
Contributor

@hellohuanlin hellohuanlin left a comment

Choose a reason for hiding this comment

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

Overall looks very good!

@hellohuanlin
Copy link
Contributor

CC @LouiseHsu who recently did a pretty big swift migration for in-app purchase plugin.

@mchudy mchudy force-pushed the feature/camera-ocmock-refactoring-part2 branch 2 times, most recently from e7d6b59 to c597ad3 Compare December 30, 2024 12:40
@mchudy
Copy link
Contributor Author

mchudy commented Dec 30, 2024

I'm not sure why the CI build fails. Locally it builds successfully. Do you have any tip maybe what can be the cause of this issue?

Failed to build iOS app
Lexical or Preprocessor Issue (Xcode): 'FLTCaptureDeviceControlling.h' file not found
/Volumes/Work/s/w/ir/x/w/packages/packages/camera/camera_avfoundation/ios/camera_avfoundation/Sources/camera_avfoundation/include/camera_avfoundation/FLTCamMediaSettingsAVWrapper.h:7:8

@hellohuanlin
Copy link
Contributor

I'm not sure why the CI build fails. Locally it builds successfully. Do you have any tip maybe what can be the cause of this issue?

Failed to build iOS app
Lexical or Preprocessor Issue (Xcode): 'FLTCaptureDeviceControlling.h' file not found
/Volumes/Work/s/w/ir/x/w/packages/packages/camera/camera_avfoundation/ios/camera_avfoundation/Sources/camera_avfoundation/include/camera_avfoundation/FLTCamMediaSettingsAVWrapper.h:7:8

it's been a while since i touched this, but it sounds like either module map or umbrella header. I'd look into a similar header and see how it is setup.

@hellohuanlin
Copy link
Contributor

I don't find a 2nd reviewer from the CODEOWNER for this plugin. Maybe @LouiseHsu who recently did a similar swift migration?

@mchudy mchudy force-pushed the feature/camera-ocmock-refactoring-part2 branch from 840af1d to 8256579 Compare December 30, 2024 22:47
@hellohuanlin hellohuanlin requested a review from jmagman December 30, 2024 23:20
@mchudy mchudy force-pushed the feature/camera-ocmock-refactoring-part2 branch 8 times, most recently from d65a805 to 04f1e8b Compare January 2, 2025 09:12
@mchudy
Copy link
Contributor Author

mchudy commented Jan 2, 2025

I fixed the CI, kind of a workaround (for some reason I cannot get this to work with subfolders). I'm gonna try to fix that in further PRs, but I don't want to block this one.

@mchudy mchudy force-pushed the feature/camera-ocmock-refactoring-part2 branch from 04f1e8b to d4c4f3a Compare January 14, 2025 10:01
@mchudy mchudy requested a review from stuartmorgan January 16, 2025 14:47
@mchudy mchudy force-pushed the feature/camera-ocmock-refactoring-part2 branch from 81fe294 to 0670369 Compare January 17, 2025 14:14
@mchudy mchudy force-pushed the feature/camera-ocmock-refactoring-part2 branch from 0670369 to e3f1afd Compare January 17, 2025 14:15
@mchudy mchudy requested a review from stuartmorgan January 24, 2025 09:52
Copy link
Contributor

@stuartmorgan stuartmorgan left a comment

Choose a reason for hiding this comment

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

LGTM, thanks!

@stuartmorgan stuartmorgan added the autosubmit Merge PR when tree becomes green via auto submit App label Jan 24, 2025
@auto-submit auto-submit bot merged commit 73857c6 into flutter:main Jan 24, 2025
77 checks passed
@mchudy mchudy deleted the feature/camera-ocmock-refactoring-part2 branch January 24, 2025 11:32
engine-flutter-autoroll added a commit to engine-flutter-autoroll/flutter that referenced this pull request Jan 24, 2025
engine-flutter-autoroll added a commit to engine-flutter-autoroll/flutter that referenced this pull request Jan 24, 2025
engine-flutter-autoroll added a commit to engine-flutter-autoroll/flutter that referenced this pull request Jan 24, 2025
engine-flutter-autoroll added a commit to engine-flutter-autoroll/flutter that referenced this pull request Jan 27, 2025
github-merge-queue bot pushed a commit to flutter/flutter that referenced this pull request Jan 27, 2025
flutter/packages@3d3ab7b...258f6dc

2025-01-24 [email protected] [shared_preferences] Add shared
preferences devtool (flutter/packages#8494)
2025-01-24 [email protected] [shared_preferences] update List<String>
encode/decode (flutter/packages#8335)
2025-01-24 [email protected] Manual roll Flutter from
c1561a4 to c1ffaa9 (21 revisions) (flutter/packages#8498)
2025-01-24 [email protected] [ios_platform_images] Switch to
`loadImage` (flutter/packages#8216)
2025-01-24 [email protected] [camera] Remove OCMock from
CameraExposureTests and CameraFocusTests (flutter/packages#8351)
2025-01-24 [email protected] [shared_preferences] Tool for migrating
from legacy shared_preferences to shared_preferences_async
(flutter/packages#8229)
2025-01-23 [email protected] Revert "[shared_preferences] Add
shared preferences devtool" (flutter/packages#8493)
2025-01-23 [email protected] [go_router] Fix
return type of current state getter to be non-nullable
(flutter/packages#8173)
2025-01-23 [email protected] Manual roll Flutter from
b2f515f to c1561a4 (18 revisions) (flutter/packages#8491)
2025-01-23 [email protected] [pigeon] fixes event channel dart
instance name usage and adds test (flutter/packages#8483)
2025-01-23 [email protected] [go
_route] fragment parameter added (flutter/packages#8232)
2025-01-23 [email protected] [in_app_purchase] Update
in_app_purchase_android version in in_app_purchase
(flutter/packages#8463)
2025-01-23 [email protected] [image_picker] Reference alternate
macOS implementations (flutter/packages#8487)
2025-01-23 [email protected] [rfw]
Activate leak testing (flutter/packages#8370)
2025-01-23 [email protected]
[video_player] Activate leak testing (flutter/packages#8379)
2025-01-23 [email protected] Manual roll Flutter from
b9e86a5 to b2f515f (42 revisions) (flutter/packages#8482)
2025-01-23 [email protected] [camera] Add API support query for
image streaming (app-facing) (flutter/packages#8422)
2025-01-23 [email protected] Manual roll Flutter from
b9e86a5 to eb6af3d (13 revisions) (flutter/packages#8473)
2025-01-23 [email protected] [shared_preferences] Add shared
preferences devtool (flutter/packages#8322)

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
auto-submit bot pushed a commit that referenced this pull request Feb 7, 2025
…ests and ThreadSafeEventChannelTests (#8363)

Follow-up on #8342. This should be merged after #8351

- Removes OCMock dependency in `AvailableCamerasTests.m`, `CameraOrientationTests.m` and `ThreadSafeEventChannelTests.m`
- Introduces new protocol wrappers to enable mocking `FLTEventChannel` and `FLTCameraDeviceDiscovering`
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
autosubmit Merge PR when tree becomes green via auto submit App p: camera platform-ios platform-macos
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants