Skip to content

refactor(flutter_tools): unify OptionDescriptor identity and addTo - #196076

Merged
auto-submit[bot] merged 2 commits into
flutter:masterfrom
kevmoo:options-identity-cleanup
Nov 6, 2026
Merged

auto-submit[bot] merged 2 commits into
flutter:masterfrom
kevmoo:options-identity-cleanup

Conversation

@kevmoo

@kevmoo kevmoo commented Nov 5, 2026

Copy link
Copy Markdown
Contributor

Aligns OptionDescriptor.addTo ({bool? hide, String? help}) with upcoming package:args/typed.dart (dart-lang/core#1012) and removes the three non-const OptionDescriptor factories in DebuggingOptionDescriptors so every option lookup queries the exact descriptor instance registered on ArgParser:

Part of #194338

Pre-launch Checklist

…on factories

- Rename `hideOverride` to `hide` and add `String? help` on `OptionDescriptor.addTo`, `OptionBundle.register`, and `ArgParserDescriptorExtension` to match `package:args/typed.dart`.
- Unify `DebuggingOptionDescriptors.devToolsServerAddress` onto a single `const StringOptionDescriptor`, passing `devToolsServerAddressBaseHelp` via `addTo(..., help: ...)` when `--devtools` is omitted so `FlutterCommand.devToolsServerAddress` queries the registered descriptor instance.
- Replace `DebuggingOptionDescriptors.startPaused(...)` / `startPausedOption` with an instance-scoped `_startPaused` descriptor on `RunCommandBase`, and inline `DriveCommand._publishPort` as `const`.

Part of flutter#194338
@flutter-dashboard flutter-dashboard Bot added the CICD Run CI/CD label Nov 5, 2026
@github-actions github-actions Bot added the tool Affects the "flutter" command-line tool. See also t: labels. label Nov 5, 2026

@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 refactors option descriptors and bundles in flutter_tools to preserve descriptor identity, replacing dynamic helper methods with static constants and updating registration signatures to support custom help overrides and a unified hide parameter. Feedback suggests extracting duplicated help text for _publishPort into a shared constant to maintain a single source of truth, and keeping devToolsServerAddress in DdsAndDevToolsOptionsBundle.descriptors to preserve the completeness of the public descriptors contract.

…re publishPortHelp

- Remove unused `includeEnableDevTools` and custom `register` override from
  `DdsAndDevToolsOptionsBundle` so `devToolsServerAddress` stays directly in
  `descriptors`.
- Extract `DebuggingOptionDescriptors.publishPortHelp` and share it with
  `DriveCommand._publishPort`.
- Verify `DdsAndDevToolsOptionsBundle.descriptors` and `addDdsOptions` in
  `option_descriptor_test.dart`.
@kevmoo
kevmoo requested a review from bkonyi November 6, 2026 00:57
@kevmoo kevmoo added the autosubmit Merge PR when tree becomes green via auto submit App label Nov 6, 2026
@auto-submit
auto-submit Bot added this pull request to the merge queue Nov 6, 2026
Merged via the queue into flutter:master with commit 4619658 Nov 6, 2026
23 checks passed
@flutter-dashboard flutter-dashboard Bot removed the autosubmit Merge PR when tree becomes green via auto submit App label Nov 6, 2026
@kevmoo
kevmoo deleted the options-identity-cleanup branch November 6, 2026 20:48
auto-submit Bot pushed a commit to flutter/packages that referenced this pull request Nov 7, 2026
flutter/flutter@09175cd...e36b370

2026-11-07 [email protected] Roll Fuchsia Linux SDK from KIc0XZbhLmvDpTluZ... to Sf2yvdTiFXAKkfLkD... (flutter/flutter#196160)
2026-11-07 [email protected] Roll pub packages (flutter/flutter#196155)
2026-11-07 [email protected] [iOS a11y] Use a real `UIScrollView` as a11y scrollable container (flutter/flutter#195731)
2026-11-07 [email protected] Add ParagraphStyle.hyphenCharacter to dart:ui (flutter/flutter#195345)
2026-11-07 [email protected] Roll pub packages (flutter/flutter#196143)
2026-11-06 [email protected] [Linux] Fix layer position when compositing without glBlitFramebuffer (flutter/flutter#196083)
2026-11-06 [email protected] Add support for riscv64 desktop linux engine (flutter/flutter#178712)
2026-11-06 [email protected] Add ResizeImagePolicy.cover (flutter/flutter#194665)
2026-11-06 [email protected] Roll Skia from f533d4034900 to b11315d0a096 (6 revisions) (flutter/flutter#196138)
2026-11-06 [email protected] iOS: Remove dead code/unused imports from FlutterPlatformViewsController (flutter/flutter#196084)
2026-11-06 [email protected] Replace pull_request_target workflows with pull_request + workflow_run (flutter/flutter#195536)
2026-11-06 [email protected] [master] Update Flutter DEPS to Dart 3b174b7217fe09b21da836ea623932b5f041b091 (flutter/flutter#196004)
2026-11-06 [email protected] Fix android_hardware_smoke_test retry mechanisms (flutter/flutter#195708)
2026-11-06 [email protected] Roll Skia from 452b9c1e5db6 to f533d4034900 (1 revision) (flutter/flutter#196129)
2026-11-06 [email protected] [flutter_tools] Use `ErrorHandlingFileSystem.deleteIfExists` for `IOSCoreDeviceControl` temp directory cleanup (flutter/flutter#195913)
2026-11-06 [email protected] Adds guideline tests to flutter create samples (flutter/flutter#195827)
2026-11-06 [email protected] refactor(flutter_tools): unify OptionDescriptor identity and addTo (flutter/flutter#196076)
2026-11-06 [email protected] Roll pub packages (flutter/flutter#196114)
2026-11-06 [email protected] Roll Skia from 5ce64e63a0e7 to 452b9c1e5db6 (5 revisions) (flutter/flutter#196111)
2026-11-06 [email protected] Add PlatformDispatcher.onAlwaysUse24HourFormatChanged callback (flutter/flutter#194670)
2026-11-06 [email protected] Roll Packages from 0478162 to 63881f9 (10 revisions) (flutter/flutter#196108)
2026-11-06 [email protected] Roll Skia from 793b8ac73d4b to 5ce64e63a0e7 (4 revisions) (flutter/flutter#196107)

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
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

CICD Run CI/CD tool Affects the "flutter" command-line tool. See also t: labels.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants