Repository navigation
Add migration guide to decoupling's deprecation message - #194592
Conversation
|
It looks like this pull request may not have tests. Please make sure to add tests or get an explicit test exemption before merging. 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. If both you and the PR author believe this PR qualifies for a test exemption, escalate to the tech lead for the changed area to review and apply the |
There was a problem hiding this comment.
Code Review
This pull request updates the deprecation messages in cupertino.dart and material.dart to include a link to the migration guide. The review feedback suggests splitting the long deprecation message strings across multiple lines to comply with the 80-character line limit recommendation in the Dart style guide.
Co-authored-by: gemini-code-assist[bot] <176961590+gemini-code-assist[bot]@users.noreply.github.com>
Co-authored-by: gemini-code-assist[bot] <176961590+gemini-code-assist[bot]@users.noreply.github.com>
I asked this question in a meeting with framework and ecosystem engineers and the unanimous answer was yes. |
| @Deprecated( | ||
| 'Use package:cupertino_ui/cupertino_ui.dart instead. ' | ||
| 'See the migration guide at: ' | ||
| 'https://docs.flutter.dev/release/breaking-changes/material-ui-and-cupertino-ui. ' |
There was a problem hiding this comment.
Should this have a trailing white space after the period? Same for material.
There was a problem hiding this comment.
I think the answer is yes for all lines except the final line, for example:
flutter/packages/flutter/lib/src/material/progress_indicator.dart
Lines 431 to 435 in 18aa680
|
autosubmit label was removed for flutter/flutter/194592, because - This pull request has the |
|
I applied |
This PR updates our [Tree Hygiene wiki page](https://github.com/flutter/flutter/blob/master/docs/contributing/Tree-hygiene.md#deprecations) to say that we should include a link to the migration guide inside of deprecation messages. This was decided in order to help agents (and regular ol' humans) discover how to migrate deprecated code. See flutter#194592 for more information. FYI @jakemac53 --------- Co-authored-by: gemini-code-assist[bot] <176961590+gemini-code-assist[bot]@users.noreply.github.com>
It was revealed by @jakemac53 that agents are struggling to find our recommendations for migrating things to material_ui and cupertino_ui, such as the [compatibility bridge](https://docs.flutter.dev/release/breaking-changes/material-ui-and-cupertino-ui#compatibility-bridge). This PR makes it obvious by putting the migration guide in the error message. This changes the deprecations added in flutter#192957. Open question: Should we always include a link to the relevant migration guide in the corresponding deprecation message? --------- Co-authored-by: gemini-code-assist[bot] <176961590+gemini-code-assist[bot]@users.noreply.github.com>
This PR updates our [Tree Hygiene wiki page](https://github.com/flutter/flutter/blob/master/docs/contributing/Tree-hygiene.md#deprecations) to say that we should include a link to the migration guide inside of deprecation messages. This was decided in order to help agents (and regular ol' humans) discover how to migrate deprecated code. See flutter#194592 for more information. FYI @jakemac53 --------- Co-authored-by: gemini-code-assist[bot] <176961590+gemini-code-assist[bot]@users.noreply.github.com>
It was revealed by @jakemac53 that agents are struggling to find our recommendations for migrating things to material_ui and cupertino_ui, such as the compatibility bridge. This PR makes it obvious by putting the migration guide in the error message.
This changes the deprecations added in #192957.
Open question: Should we always include a link to the relevant migration guide in the corresponding deprecation message?