-
Notifications
You must be signed in to change notification settings - Fork 9.8k
[camera] Export VideoCaptureOptions so that implementers can use it #6666
[camera] Export VideoCaptureOptions so that implementers can use it #6666
Conversation
It looks like this pull request may not have tests. Please make sure to add tests before merging. If you need an exemption to this rule, contact Hixie on the #hackers channel in Chat (don't just cc him here, he won't see it! He's on Discord!). If you are not sure if you need tests, consider this rule of thumb: the purpose of a test is to make sure someone doesn't accidentally revert the fix. Ask yourself, is there anything in your PR that you feel it is important we not accidentally revert back to how it was before your fix? Reviewers: Read the Tree Hygiene page and make sure this patch meets those guidelines before LGTMing. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
@stuartmorgan for secondary review.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We should be able to add a test for this by having a test file that imports only the primary package import, and uses all the classes we expect to be publicly available.
Yeah I was gonna say, the implication of there not being a test here is that we're not actually testing the stuff we're exporting, which is concerning. :-) |
Yea, that's a good point. I suppose I haven't been testing exports because it often gets overlooked by other changes in a PR. |
I agree some tests here would be useful. @stuartmorgan are you saying that adding those tests needs to be part of this PR, or was it a forward-looking statement? |
Yes, they should be part of this PR since the PR isn't test-exempt. |
Got it @stuartmorgan, I've added a test class to verify that the classes exported from |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good other than a comment about test location.
You'll also need to merge in master to fix the CI failures (due to credential rotation in the repository).
@@ -0,0 +1,48 @@ | |||
// Copyright 2013 The Flutter Authors. All rights reserved. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Since this is really testing that the main interface file exports types, not the types themselves, these tests should be a new group('exports' ...
in test/camera_platform_interface_test.dart
, rather than a new test file here.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Done.
Also added tests so that missing exports can be more easily tested in the future.
2f8f895
to
826145b
Compare
* 017e776f9 Revert "[ci]Temporarily disable starqlteue on firebase device lab (#6657)" (flutter/plugins#6710) * d6c0bcbf2 [ci] Manually Roll Flutter from 61e927d to d2e6dfe (143 revisions) (flutter/plugins#6723) * 283122b1f Roll Flutter from d2e6dfe to 46d868c (5 revisions) (flutter/plugins#6724) * 1aabcd62a [camera] Export VideoCaptureOptions so that implementers can use it (flutter/plugins#6666) * 475caa001 Roll Flutter from 46d868c to 633d7ef (8 revisions) (flutter/plugins#6725)
…#115761) * 017e776f9 Revert "[ci]Temporarily disable starqlteue on firebase device lab (flutter#6657)" (flutter/plugins#6710) * d6c0bcbf2 [ci] Manually Roll Flutter from 61e927d to d2e6dfe (143 revisions) (flutter/plugins#6723) * 283122b1f Roll Flutter from d2e6dfe to 46d868c (5 revisions) (flutter/plugins#6724) * 1aabcd62a [camera] Export VideoCaptureOptions so that implementers can use it (flutter/plugins#6666) * 475caa001 Roll Flutter from 46d868c to 633d7ef (8 revisions) (flutter/plugins#6725)
…#115761) * 017e776f9 Revert "[ci]Temporarily disable starqlteue on firebase device lab (flutter#6657)" (flutter/plugins#6710) * d6c0bcbf2 [ci] Manually Roll Flutter from 61e927d to d2e6dfe (143 revisions) (flutter/plugins#6723) * 283122b1f Roll Flutter from d2e6dfe to 46d868c (5 revisions) (flutter/plugins#6724) * 1aabcd62a [camera] Export VideoCaptureOptions so that implementers can use it (flutter/plugins#6666) * 475caa001 Roll Flutter from 46d868c to 633d7ef (8 revisions) (flutter/plugins#6725)
…lutter#6666) * Export VideoCaptureOptions so that it is accessible to other packages Also added tests so that missing exports can be more easily tested in the future. * Fix dart analyze warnings
This should have been done in #6550 but was missed.
Related to flutter/flutter#83634
Pre-launch Checklist
dart format
.)[shared_preferences]
pubspec.yaml
with an appropriate new version according to the [pub versioning philosophy], or this PR is [exempt from version changes].CHANGELOG.md
to add a description of the change, [following repository CHANGELOG style].///
).