Skip to content

Link migration guide in deprecation messages - #195361

Merged
auto-submit[bot] merged 3 commits into
masterfrom
justinmc-deprecation-migration-guides
Oct 27, 2026
Merged

auto-submit[bot] merged 3 commits into
masterfrom
justinmc-deprecation-migration-guides

Conversation

@justinmc

Copy link
Copy Markdown
Contributor

This PR updates our Tree Hygiene wiki page 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 #194592 for more information.

FYI @jakemac53

@flutter-dashboard flutter-dashboard Bot added the CICD Run CI/CD label Oct 26, 2026
@github-actions github-actions Bot added c: contributor-productivity Team-specific productivity, code health, technical debt. framework flutter/packages/flutter repository. See also f: labels. d: docs/ flutter/flutter/docs, for contributors labels Oct 26, 2026
Comment on lines 523 to 526
Removing deprecated APIs from the framework are not currently planned. In the past, deprecations were removed after a set
amount of time. This is not currently in practice. If and when we do resume removing deprecated APIs, it will be announced
across several channels like the [flutter-announce group](https://groups.google.com/g/flutter-announce), and the
[Discord](../contributing/Chat.md).

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

This paragraph is something else we might want to update, but let's wait until we have a solid plan.

@gemini-code-assist gemini-code-assist Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Code Review

This pull request updates the Tree-hygiene.md documentation to specify that deprecation messages must provide clear migration steps, typically by linking to a migration guide. It updates the @Deprecated syntax pattern and example to include a placeholder for the migration guide link. The review feedback suggests clarifying that a link to the migration guide should be included rather than the guide itself, and marking the migration guide link placeholder as optional where applicable.

Comment thread docs/contributing/Tree-hygiene.md Resolved
@Deprecated(
'[description of how to migrate] '
'[brief motivation for why we are breaking the API] '
'[link to the migration guide] '

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

medium

Since not all deprecations require a full migration guide (e.g., simple renames or trivial replacements), we should indicate that the migration guide link is optional or only applicable when a guide exists.

Suggested change
'[link to the migration guide] '
'[link to the migration guide, if applicable] '

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

I say leave this as-is. I don't want to give people an out. The vast majority if not all deprecation messages should have a migration guide IMO.

Co-authored-by: gemini-code-assist[bot] <176961590+gemini-code-assist[bot]@users.noreply.github.com>
Renzo-Olivares
Renzo-Olivares previously approved these changes Oct 26, 2026

@Renzo-Olivares Renzo-Olivares left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

LGTM

@github-actions github-actions Bot added the tool Affects the "flutter" command-line tool. See also t: labels. label Oct 26, 2026
testWithoutContext(
'Plugin parsing rejects sharedDarwinSource without pluginClass or ffiPlugin',
() {
final fileSystem = MemoryFileSystem.test();

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Why are changes in this file needed, they seem unrelated.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

I thought that was going to go away with a merge, let me rebase...

@justinmc
justinmc force-pushed the justinmc-deprecation-migration-guides branch from 1ac968b to 95655d7 Compare October 26, 2026 23:09
@github-actions github-actions Bot removed the tool Affects the "flutter" command-line tool. See also t: labels. label Oct 26, 2026

@Renzo-Olivares Renzo-Olivares left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

LGTM

@justinmc justinmc added the autosubmit Merge PR when tree becomes green via auto submit App label Oct 27, 2026
@auto-submit
auto-submit Bot added this pull request to the merge queue Oct 27, 2026
Merged via the queue into master with commit 380cb8d Oct 27, 2026
28 checks passed
@auto-submit
auto-submit Bot deleted the justinmc-deprecation-migration-guides branch October 27, 2026 17:00
@flutter-dashboard flutter-dashboard Bot removed the autosubmit Merge PR when tree becomes green via auto submit App label Oct 27, 2026
auto-submit Bot pushed a commit to flutter/packages that referenced this pull request Oct 28, 2026
flutter/flutter@d4c8577...0c2473c

2026-10-28 [email protected] Roll Packages from a8549ae to 13d38e0 (9 revisions) (flutter/flutter#195488)
2026-10-28 [email protected] Use int.oneBitCount in PersistentHashMap and scope 53-bit caps to JS (flutter/flutter#195005)
2026-10-28 [email protected] Roll pub packages (flutter/flutter#195483)
2026-10-28 [email protected] [iPhone Duo] Use the correct UIScreen to report the display size and update when fold/unfold (flutter/flutter#195199)
2026-10-28 [email protected] [fuchsia] Fix portable_ui_test.h includes for newer Fuchsia SDKs (flutter/flutter#195420)
2026-10-28 [email protected] Change default pipeline options to match production draw calls (flutter/flutter#194597)
2026-10-28 [email protected] Roll Fuchsia Test Scripts from 2T18KC7-LDQtmQiLP... to xl1LWBuppzu-BnOzV... (flutter/flutter#195450)
2026-10-27 [email protected] [flutter_tools] Inject dependencies into Darwin build targets, native assets, and Xcode build settings (flutter/flutter#194052)
2026-10-27 [email protected] Revert: Reland square corners fix (flutter/flutter#195436)
2026-10-27 [email protected] [flutter_tools] Add DeviceService app launch and flutter run support for tool extensions (flutter/flutter#194589)
2026-10-27 [email protected] [engine] Honor targetWidth/targetHeight for animated images (flutter/flutter#194615)
2026-10-27 [email protected] [Android][a11y] Set visibleToUser=false for hidden semantics nodes (flutter/flutter#194411)
2026-10-27 [email protected] Fix repo deletion test flake (flutter/flutter#195349)
2026-10-27 [email protected] Roll Packages from 23a05b6 to a8549ae (10 revisions) (flutter/flutter#195434)
2026-10-27 [email protected] [web] Capture pointers to the Flutter view so drags survive platform view iframes (flutter/flutter#195187)
2026-10-27 [email protected] [web] Add opt-in raw samples, measured sample count and warm-up phase hook to the web benchmark recorder (flutter/flutter#195118)
2026-10-27 [email protected] Link migration guide in deprecation messages (flutter/flutter#195361)
2026-10-27 [email protected] Pin basic_material_app_macos__compile to macOS 26 (flutter/flutter#195429)
2026-10-27 [email protected] Add benchmark for warmed pipeline usage (flutter/flutter#195001)
2026-10-27 [email protected] [flutter_tools] Add device log streaming support to DeviceService and ExtensionBackedDevice (flutter/flutter#194964)
2026-10-27 [email protected] Roll Dart SDK from 1d16c04dc346 to 65fc979759ca (4 revisions) (flutter/flutter#195383)

If this roll has caused a breakage, revert this CL and set the roller
to dry run mode using the controls here:
https://autoroll.skia.org/r/flutter-packages
Please CC [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
suryaKommana2662 pushed a commit to suryaKommana2662/flutter that referenced this pull request Oct 29, 2026
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>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

c: contributor-productivity Team-specific productivity, code health, technical debt. CICD Run CI/CD d: docs/ flutter/flutter/docs, for contributors framework flutter/packages/flutter repository. See also f: labels.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants