Skip to content

Conversation

@polina-c
Copy link
Contributor

Contributes to #144910

@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 "@test-exemption-reviewer" in the #hackers channel in Chat (don't just cc them here, they won't see it! Use 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.

@polina-c polina-c requested a review from goderbauer March 11, 2024 03:37
@github-actions github-actions bot added framework flutter/packages/flutter repository. See also f: labels. f: material design flutter/packages/flutter/material repository. labels Mar 11, 2024
@polina-c
Copy link
Contributor Author

Test coverage is not needed because this PR is to improve troubleshooting.

@Hixie
Copy link
Contributor

Hixie commented Mar 11, 2024

I don't quite understand why we wouldn't want to test this? It seems like we should test that all ChangeNotifiers are properly calling this. After all, if someone removes this code, that is a regression we would want to catch, no?

@polina-c
Copy link
Contributor Author

polina-c commented Mar 11, 2024

I don't quite understand why we wouldn't want to test this? It seems like we should test that all ChangeNotifiers are properly calling this. After all, if someone removes this code, that is a regression we would want to catch, no?

Removal of this code will result in more complicated troubleshooting, but no regression.

ChangeNotifiers that leaks make this call anyway in 'addListener'. Making it in constructor instead will make troubleshooting easier, because will give creation call stack for a leaking object.

See description: https://github.com/dart-lang/leak_tracker/blob/main/doc/leak_tracking/TROUBLESHOOT.md#1-it-is-not-clear-who-owns-changenotifier

It is hard to test cover, because the class is internal and complexity of making it testable does not worth it.

Does it help?

@Hixie
Copy link
Contributor

Hixie commented Mar 11, 2024

We should definitely consider more complicated troubleshooting to be a regression.

That said, I agree with you that this code is virtually impossible to test without a change to Dart to allow privates to be tested. Hopefully one day we'll have that, but that day is not today.

test-exempt: testing this requires a change to Dart or a change to the API; changing the API is not desired for this code.

Copy link
Member

@goderbauer goderbauer left a comment

Choose a reason for hiding this comment

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

LGTM

@polina-c polina-c added the autosubmit Merge PR when tree becomes green via auto submit App label Mar 11, 2024
@auto-submit auto-submit bot merged commit e66811a into flutter:master Mar 11, 2024
@polina-c polina-c deleted the instrument-TabController branch March 11, 2024 23:52
engine-flutter-autoroll added a commit to engine-flutter-autoroll/packages that referenced this pull request Mar 12, 2024
auto-submit bot pushed a commit to flutter/packages that referenced this pull request Mar 12, 2024
Manual roll requested by [email protected]

flutter/flutter@3bb2e59...1ca8873

2024-03-12 [email protected] Update integration tests regexes. (flutter/flutter#144847)
2024-03-11 98614782+auto-submit[bot]@users.noreply.github.com Reverts "Fail tests on exceptions raised after test completed (#144706)" (flutter/flutter#144970)
2024-03-11 [email protected] Make TabController communicating creation in constructor. (flutter/flutter#144912)
2024-03-11 [email protected] Fail tests on exceptions raised after test completed (flutter/flutter#144706)
2024-03-11 [email protected] Refactoring `if` chains into `switch` statements (flutter/flutter#144905)
2024-03-11 98614782+auto-submit[bot]@users.noreply.github.com Reverts "Expose build mode in environment of asset transformer processes (#144752)" (flutter/flutter#144957)
2024-03-11 [email protected] Expose build mode in environment of asset transformer processes (flutter/flutter#144752)
2024-03-11 [email protected] Roll Flutter Engine from 9196947bc687 to 6745955bb49e (2 revisions) (flutter/flutter#144946)
2024-03-11 [email protected] Skip test temporarily until headingLevel is added in engine (issue 41â�¦ (flutter/flutter#135077)
2024-03-11 [email protected] Roll Flutter Engine from 3b0b59bb224d to 9196947bc687 (1 revision) (flutter/flutter#144934)
2024-03-11 [email protected] Roll Packages from 0badb43 to d489d84 (3 revisions) (flutter/flutter#144931)

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 [email protected],[email protected],[email protected] 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
engine-flutter-autoroll added a commit to engine-flutter-autoroll/packages that referenced this pull request May 14, 2024
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 f: material design flutter/packages/flutter/material repository. framework flutter/packages/flutter repository. See also f: labels.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants