Thanks to visit codestin.com
Credit goes to github.com

Skip to content
This repository was archived by the owner on Feb 22, 2023. It is now read-only.

[camera] Remove usage of _ambiguate method in example #6555

Merged

Conversation

nilsreichardt
Copy link
Contributor

Part of flutter/flutter#111841

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/plugins repo does use dart format.)
  • I signed the CLA.
  • The title of the PR starts with the name of the plugin 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.

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

@flutter-dashboard
Copy link

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.

@@ -4,7 +4,7 @@ publish_to: none

environment:
sdk: ">=2.14.0 <3.0.0"
Copy link
Contributor Author

Choose a reason for hiding this comment

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

Should we also update the minimum Dart SDK because Flutter 3 requires +2.17?

Copy link
Contributor

Choose a reason for hiding this comment

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

We generally only update the Dart version if we are actually enabling or requiring some new Dart functionality. This change is only about a Flutter API change, not a Dart change.

@@ -4,7 +4,7 @@ description: A Flutter plugin for controlling the camera. Supports previewing
Dart.
repository: https://github.com/flutter/plugins/tree/main/packages/camera/camera
issue_tracker: https://github.com/flutter/flutter/issues?q=is%3Aissue+is%3Aopen+label%3A%22p%3A+camera%22
version: 0.10.0+3
version: 0.10.0+4
Copy link
Contributor Author

Choose a reason for hiding this comment

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

Just updating the patch version because only the example code has been changed.

@@ -1,3 +1,8 @@
## 0.10.0+4

* Removes usages of `_ambiguate` method in example.
Copy link
Contributor Author

Choose a reason for hiding this comment

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

Is this enough or should it be more descriptive?

@nilsreichardt
Copy link
Contributor Author

@stuartmorgan Is this structure okay? If yes, I would also remove the _ambiguate method in the other plugins 👍

@nilsreichardt
Copy link
Contributor Author

Should I request a test exempt or add tests for this? If yes, how?

Copy link
Contributor

@stuartmorgan-g stuartmorgan-g left a comment

Choose a reason for hiding this comment

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

This should qualify for a test exemption since it's conceptually just code removal.

@@ -4,7 +4,7 @@ publish_to: none

environment:
sdk: ">=2.14.0 <3.0.0"
flutter: ">=2.10.0"
flutter: ">=3.0.0"
Copy link
Contributor

Choose a reason for hiding this comment

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

You'll need to change the requirements for camera itself too, since we can't guarantee we won't break 2.10 going forward if we can't run the example.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Bumped it to Flutter 3.0 also for camera 👍 Is it then still just a patch update? For v0.10.0+2 this was case

Copy link
Contributor

Choose a reason for hiding this comment

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

Yes; dropping support for old versions isn't a breaking change because the pub resolver just won't even include it.

Copy link
Contributor

@stuartmorgan-g stuartmorgan-g 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-g
Copy link
Contributor

@bparrishMines for secondary review.

@nilsreichardt
Copy link
Contributor Author

Thanks for the review and fixing the typos, @stuartmorgan ❤️

@Hixie
Copy link
Contributor

Hixie commented Oct 11, 2022

test-exempt: code removal

on a personal note, thank you for cleaning up my mess!

Copy link
Contributor

@bparrishMines bparrishMines left a comment

Choose a reason for hiding this comment

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

LGTM

@bparrishMines bparrishMines added the autosubmit Merge PR when tree becomes green via auto submit App label Oct 20, 2022
@auto-submit auto-submit bot merged commit 09a4a09 into flutter:main Oct 20, 2022
@ditman
Copy link
Member

ditman commented Oct 20, 2022

Woops, this seems to have broken main?

* `dart analyze` found the following issue(s):
  Analyzing camera...
  
    error - example/integration_test/camera_test.dart:12:8 - Target of URI doesn't exist: 'package:integration_test/integration_test.dart'. Try creating the file referenced by the URI, or try using a URI for a file that does exist. - uri_does_not_exist
    error - example/integration_test/camera_test.dart:13:8 - Target of URI doesn't exist: 'package:path_provider/path_provider.dart'. Try creating the file referenced by the URI, or try using a URI for a file that does exist. - [...]ges
     info - example/integration_test/camera_test.dart:13:8 - The imported package 'path_provider' isn't a dependency of the importing package. Try adding a dependency for 'path_provider' in the 'pubspec.yaml' file. - depend_on_referenced_packages
     info - example/test/main_test.dart:5:8 - The imported package 'camera_example' isn't a dependency of the importing package. Try adding a dependency for 'camera_example' in the 'pubspec.yaml' file. - depend_on_referenced_packages
  
  9 issues found.

@stuartmorgan-g
Copy link
Contributor

The breakage looks like it's latent due to a recent change to how publish --dry-run works. It's OOB breakage because the dry-run test doesn't actually do anything on rolls, since there's nothing to publish, so all the rest of the pub checks are bypassed :( I'll file an issue; maybe we should fake-bump the version before running that check.

mauricioluz pushed a commit to mauricioluz/plugins that referenced this pull request Jan 26, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
autosubmit Merge PR when tree becomes green via auto submit App needs tests p: camera
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants