Warn about the use of TestSemantics#184369
Conversation
There was a problem hiding this comment.
Code Review
This pull request adds a TODO and documentation to the TestSemantics class, advising against its use due to frequent breakages and recommending SemanticsController.find as an alternative. Feedback was provided to correct a typo and improve the punctuation in the added documentation for better clarity.
navaronbracke
left a comment
There was a problem hiding this comment.
Can we compile a list of where it is used currently and put that in the linked issue? (yet more cross import cleanup, d'oh!)
| /// This class should be avoided due to a high frequency of breakages caused by | ||
| /// small semantics tree changes. Instead, prefer [SemanticsController.find], | ||
| /// accessible via [WidgetTester.semantics]. | ||
| class TestSemantics { |
There was a problem hiding this comment.
Should we deprecate it? (we do allow deprecated symbols in-repo, so why not?)
There was a problem hiding this comment.
Good point. I don't think it will show warnings when people flutter test. I'll go ahead and do it and make sure CI is ok with it.
chunhtai
left a comment
There was a problem hiding this comment.
LGTM, marking deprecate is fine, though not must have since this is not public
| /// small semantics tree changes. Instead, prefer [SemanticsController.find], | ||
| /// accessible via [WidgetTester.semantics]. |
There was a problem hiding this comment.
also mention with isSemantics and matchesSemantics matcher
|
Added all of the files to migrate to #184367. |
|
auto label is removed for flutter/flutter/184369, Failed to enqueue flutter/flutter/184369 with HTTP 400: GraphQL mutate failed. |
|
auto label is removed for flutter/flutter/184369, Failed to enqueue flutter/flutter/184369 with HTTP 400: GraphQL mutate failed. |
Co-authored-by: gemini-code-assist[bot] <176961590+gemini-code-assist[bot]@users.noreply.github.com>
1e51b55 to
0c7b7a9
Compare
|
auto label is removed for flutter/flutter/184369, Failed to enqueue flutter/flutter/184369 with HTTP 400: GraphQL mutate failed. |
flutter/flutter@05e0ae0...81c87ea 2026-04-09 katelovett@google.com Remove last material dependency from cupertino tests (flutter/flutter#184781) 2026-04-09 engine-flutter-autoroll@skia.org Roll Skia from 7c46cb639dba to 4d0f5389e131 (7 revisions) (flutter/flutter#184812) 2026-04-09 goderbauer@google.com Make `windowing_test` follow repo analyzer rules (flutter/flutter#184752) 2026-04-09 116356835+AbdeMohlbi@users.noreply.github.com Improve documentation of `frictionFactor` function (flutter/flutter#184509) 2026-04-09 engine-flutter-autoroll@skia.org Roll Skia from d2b0bd12576a to 7c46cb639dba (1 revision) (flutter/flutter#184796) 2026-04-09 engine-flutter-autoroll@skia.org Roll Fuchsia GN SDK from JLBh4Z9PKsjIJcqDU... to SEfYx3xgueX3aFAY3... (flutter/flutter#184797) 2026-04-09 katelovett@google.com Fixed freeze flow (flutter/flutter#184793) 2026-04-09 137456488+flutter-pub-roller-bot@users.noreply.github.com Roll pub packages (flutter/flutter#184795) 2026-04-09 engine-flutter-autoroll@skia.org Roll Skia from e9ed4fc9f154 to d2b0bd12576a (36 revisions) (flutter/flutter#184791) 2026-04-08 43054281+camsim99@users.noreply.github.com [Android] Allow sensitive content to gracefully fail when unregistering host before registering (flutter/flutter#184789) 2026-04-08 34465683+rkishan516@users.noreply.github.com Refactor: remove material from autocomplete_test, scrollable_restoration_test, semantics_tester_generate_test_semantics_expression_for_current_semantics_tree_test (flutter/flutter#184615) 2026-04-08 jmccandless@google.com Warn about the use of TestSemantics (flutter/flutter#184369) 2026-04-08 katelovett@google.com Change freeze flow to pull_request_target (flutter/flutter#184785) 2026-04-08 1063596+reidbaker@users.noreply.github.com Update to the beta dart version for 3.44 branch cut. (flutter/flutter#184770) 2026-04-08 737941+loic-sharma@users.noreply.github.com [Dot shorthands] Migrate examples/api/test (flutter/flutter#183966) 2026-04-08 rmacnak@google.com [fuchsia] Give AOT runners the ability to copy FFI callback thunks. (flutter/flutter#184696) 2026-04-08 victorsanniay@gmail.com Add await or ignore lint to invokeMethod callsites (flutter/flutter#182870) 2026-04-08 robert.ancell@canonical.com Correctly handle failure to read /proc/self/exe link (flutter/flutter#184700) 2026-04-08 engine-flutter-autoroll@skia.org Roll Skia from e264d870a380 to e9ed4fc9f154 (11 revisions) (flutter/flutter#184713) 2026-04-08 engine-flutter-autoroll@skia.org Roll Packages from 5299279 to 0e0a032 (5 revisions) (flutter/flutter#184720) 2026-04-08 137456488+flutter-pub-roller-bot@users.noreply.github.com Roll pub packages (flutter/flutter#184772) 2026-04-08 engine-flutter-autoroll@skia.org Roll Fuchsia Linux SDK from 1rcChbOv4nSTVkUxs... to pDXMXRIjEHTw7B0sk... (flutter/flutter#184722) 2026-04-08 73785960+xfce0@users.noreply.github.com Remove navigator_utils cross-imports from cupertino tests (flutter/flutter#184282) 2026-04-08 victorsanniay@gmail.com Even more awaits v2 (flutter/flutter#184552) 2026-04-08 15619084+vashworth@users.noreply.github.com Allow personal skills to be gitignored (flutter/flutter#184727) 2026-04-08 dacoharkes@google.com [ci] mac_arm64 build_test re-enable shard 1 presubmit (flutter/flutter#184751) 2026-04-08 katelovett@google.com Fix repo check on code freeze (flutter/flutter#184771) 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 Please CC bmparr@google.com,stuartmorgan@google.com on the revert to ensure that a human is aware of the problem. To file a bug in Packages: 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
As decided in flutter#183790 (comment), we should avoid using TestSemantics. Let's communicate that for now until we can remove the class entirely. Part of flutter#184367. --------- Co-authored-by: gemini-code-assist[bot] <176961590+gemini-code-assist[bot]@users.noreply.github.com>
…r#11477) flutter/flutter@05e0ae0...81c87ea 2026-04-09 katelovett@google.com Remove last material dependency from cupertino tests (flutter/flutter#184781) 2026-04-09 engine-flutter-autoroll@skia.org Roll Skia from 7c46cb639dba to 4d0f5389e131 (7 revisions) (flutter/flutter#184812) 2026-04-09 goderbauer@google.com Make `windowing_test` follow repo analyzer rules (flutter/flutter#184752) 2026-04-09 116356835+AbdeMohlbi@users.noreply.github.com Improve documentation of `frictionFactor` function (flutter/flutter#184509) 2026-04-09 engine-flutter-autoroll@skia.org Roll Skia from d2b0bd12576a to 7c46cb639dba (1 revision) (flutter/flutter#184796) 2026-04-09 engine-flutter-autoroll@skia.org Roll Fuchsia GN SDK from JLBh4Z9PKsjIJcqDU... to SEfYx3xgueX3aFAY3... (flutter/flutter#184797) 2026-04-09 katelovett@google.com Fixed freeze flow (flutter/flutter#184793) 2026-04-09 137456488+flutter-pub-roller-bot@users.noreply.github.com Roll pub packages (flutter/flutter#184795) 2026-04-09 engine-flutter-autoroll@skia.org Roll Skia from e9ed4fc9f154 to d2b0bd12576a (36 revisions) (flutter/flutter#184791) 2026-04-08 43054281+camsim99@users.noreply.github.com [Android] Allow sensitive content to gracefully fail when unregistering host before registering (flutter/flutter#184789) 2026-04-08 34465683+rkishan516@users.noreply.github.com Refactor: remove material from autocomplete_test, scrollable_restoration_test, semantics_tester_generate_test_semantics_expression_for_current_semantics_tree_test (flutter/flutter#184615) 2026-04-08 jmccandless@google.com Warn about the use of TestSemantics (flutter/flutter#184369) 2026-04-08 katelovett@google.com Change freeze flow to pull_request_target (flutter/flutter#184785) 2026-04-08 1063596+reidbaker@users.noreply.github.com Update to the beta dart version for 3.44 branch cut. (flutter/flutter#184770) 2026-04-08 737941+loic-sharma@users.noreply.github.com [Dot shorthands] Migrate examples/api/test (flutter/flutter#183966) 2026-04-08 rmacnak@google.com [fuchsia] Give AOT runners the ability to copy FFI callback thunks. (flutter/flutter#184696) 2026-04-08 victorsanniay@gmail.com Add await or ignore lint to invokeMethod callsites (flutter/flutter#182870) 2026-04-08 robert.ancell@canonical.com Correctly handle failure to read /proc/self/exe link (flutter/flutter#184700) 2026-04-08 engine-flutter-autoroll@skia.org Roll Skia from e264d870a380 to e9ed4fc9f154 (11 revisions) (flutter/flutter#184713) 2026-04-08 engine-flutter-autoroll@skia.org Roll Packages from 5299279 to 0e0a032 (5 revisions) (flutter/flutter#184720) 2026-04-08 137456488+flutter-pub-roller-bot@users.noreply.github.com Roll pub packages (flutter/flutter#184772) 2026-04-08 engine-flutter-autoroll@skia.org Roll Fuchsia Linux SDK from 1rcChbOv4nSTVkUxs... to pDXMXRIjEHTw7B0sk... (flutter/flutter#184722) 2026-04-08 73785960+xfce0@users.noreply.github.com Remove navigator_utils cross-imports from cupertino tests (flutter/flutter#184282) 2026-04-08 victorsanniay@gmail.com Even more awaits v2 (flutter/flutter#184552) 2026-04-08 15619084+vashworth@users.noreply.github.com Allow personal skills to be gitignored (flutter/flutter#184727) 2026-04-08 dacoharkes@google.com [ci] mac_arm64 build_test re-enable shard 1 presubmit (flutter/flutter#184751) 2026-04-08 katelovett@google.com Fix repo check on code freeze (flutter/flutter#184771) 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 Please CC bmparr@google.com,stuartmorgan@google.com on the revert to ensure that a human is aware of the problem. To file a bug in Packages: 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
As decided in #183790 (comment), we should avoid using TestSemantics. Let's communicate that for now until we can remove the class entirely.
Part of #184367.