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

[camerax] Marks all wrapped classes as immutable #4451

Merged
merged 18 commits into from
Jul 14, 2023

Conversation

camsim99
Copy link
Contributor

@camsim99 camsim99 commented Jul 12, 2023

Marks all Dart-wrapped Android native classes as @immutable. They are all immutable anyway because they extend JavaObject which is immutable, but marking them as immutable explicitly avoids lint warnings caused by must_be_immutable when generated mocks of these classes are used (see dart-lang/mockito#200).

Also, updates CONTRIBUTING.md to include marking wrapped classes as immutable and extending JavaObject as requirements for adding new wrapped classes.

cc @ChristianEdwardPadilla: this should fix the internal lint errors caused by JavaObject being immutable.

Pre-launch Checklist

  • I read the Contributor Guide and followed the process outlined there for submitting PRs.
  • I read the Tree Hygiene wiki page, which explains my responsibilities.
  • I read and followed the relevant style guides and ran the auto-formatter. (Unlike the flutter/flutter repo, the flutter/packages repo does use dart format.)
  • I signed the CLA.
  • The title of the PR starts with the name of the package surrounded by square brackets, e.g. [shared_preferences]
  • I listed at least one issue that this PR fixes in the description above.
  • I updated pubspec.yaml with an appropriate new version according to the pub versioning philosophy, or this PR is exempt from version changes.
  • I updated CHANGELOG.md to add a description of the change, following repository CHANGELOG style.
  • I updated/added relevant documentation (doc comments with ///).
  • I added new tests to check the change I am making, or this PR is test-exempt.
  • All existing and new tests are passing.

@camsim99 camsim99 marked this pull request as ready for review July 13, 2023 19:59
@camsim99 camsim99 requested a review from stuartmorgan July 13, 2023 20:01
@gmackall gmackall requested a review from a team July 13, 2023 21:02
@gmackall
Copy link
Member

gmackall commented Jul 14, 2023

Interesting, it looks like once one of us reviews it makes the review on behalf of the android-reviewers team and removes the request

@camsim99 camsim99 added autosubmit Merge PR when tree becomes green via auto submit App and removed autosubmit Merge PR when tree becomes green via auto submit App labels Jul 14, 2023
@auto-submit auto-submit bot merged commit 6181f65 into flutter:main Jul 14, 2023
engine-flutter-autoroll added a commit to engine-flutter-autoroll/flutter that referenced this pull request Jul 17, 2023
auto-submit bot pushed a commit to flutter/flutter that referenced this pull request Jul 17, 2023
flutter/packages@369ee7e...6889cca

2023-07-17 49699333+dependabot[bot]@users.noreply.github.com Bump github/codeql-action from 2.20.3 to 2.20.4 (flutter/packages#4490)
2023-07-15 [email protected] [ci] Switch Android unit tests to LUCI (flutter/packages#4406)
2023-07-15 [email protected] [ci] Introduce LUCI versions of Linux desktop platform tests (flutter/packages#4223)
2023-07-14 [email protected] [camerax] Marks all wrapped classes as immutable (flutter/packages#4451)
2023-07-14 [email protected] [go_router] Bumps example go_router version and migrate example code (flutter/packages#4469)

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],[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://bugs.chromium.org/p/skia/issues/entry?template=Autoroller+Bug

Documentation for the AutoRoller is here:
https://skia.googlesource.com/buildbot/+doc/main/autoroll/README.md
LouiseHsu pushed a commit to LouiseHsu/flutter that referenced this pull request Jul 31, 2023
flutter/packages@369ee7e...6889cca

2023-07-17 49699333+dependabot[bot]@users.noreply.github.com Bump github/codeql-action from 2.20.3 to 2.20.4 (flutter/packages#4490)
2023-07-15 [email protected] [ci] Switch Android unit tests to LUCI (flutter/packages#4406)
2023-07-15 [email protected] [ci] Introduce LUCI versions of Linux desktop platform tests (flutter/packages#4223)
2023-07-14 [email protected] [camerax] Marks all wrapped classes as immutable (flutter/packages#4451)
2023-07-14 [email protected] [go_router] Bumps example go_router version and migrate example code (flutter/packages#4469)

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],[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://bugs.chromium.org/p/skia/issues/entry?template=Autoroller+Bug

Documentation for the AutoRoller is here:
https://skia.googlesource.com/buildbot/+doc/main/autoroll/README.md
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
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants