Skip to content

[cli_util, process] Fix new lints and platform deprecations - #2716

Merged
kevmoo merged 2 commits into
mainfrom
fix-ci-cli-util-process
Oct 23, 2026
Merged

kevmoo merged 2 commits into
mainfrom
fix-ci-cli-util-process

Conversation

@kevmoo

@kevmoo kevmoo commented Oct 23, 2026 •

Copy link
Copy Markdown
Member

Unblocks CI on main (and Dependabot PR #2714) against Dart 3.15.0-dev and package:platform 3.2.0:

  • package:cli_util: Remove avoid_redundant_argument_values from analysis_options.yaml (along with its // ignore: comments in select_dialog_test.dart) and omit redundant null arguments in doneCompleter.complete() (select_dialog.dart).
  • package:process: Ignore deprecated_member_use in common.dart and common_test.dart for package:platform 3.2.0 (LocalPlatform, FakePlatform, operatingSystem, environment) so dart analyze --fatal-infos passes while keeping platform: '^3.0.0' compatibility.

- Update `pkgs/cli_util` to call `doneCompleter.complete()` without redundant `null` arguments and ignore `avoid_redundant_argument_values` on `maxVisibleItems: 5` in `select_dialog_test.dart` for Dart `3.15.0-dev`.
- Ignore `deprecated_member_use` in `pkgs/process` (`common.dart` and `common_test.dart`) for `package:platform` `3.2.0` deprecations and bump `process` to `5.0.7-wip`.
@kevmoo
kevmoo requested review from a team and dcharkes as code owners October 23, 2026 23:33

@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 simplifies the doneCompleter.complete() calls in select_dialog.dart, adds lint suppressions for deprecated member usage in pkgs/process, and bumps the package version to 5.0.7-wip. Feedback on the changes suggests removing the redundant maxVisibleItems: 5 argument in select_dialog_test.dart entirely rather than adding an ignore comment for avoid_redundant_argument_values.

Comment on lines +448 to +449
inputController.stream,
maxVisibleItems: 5,
maxVisibleItems: 5, // ignore: avoid_redundant_argument_values

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

Instead of adding an ignore comment for avoid_redundant_argument_values, you can simply omit the redundant maxVisibleItems: 5 argument entirely. Since 5 is already the default value for maxVisibleItems in both showMultiSelectDialog and showSingleSelectDialog, omitting it keeps the test code cleaner and avoids the need for lint suppression.

Suggested change
inputController.stream,
maxVisibleItems: 5,
maxVisibleItems: 5, // ignore: avoid_redundant_argument_values
inputController.stream,

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Where do we have this lint enabled? I'm iffy on it...

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

It was only enabled in pkgs/cli_util/analysis_options.yaml#L15 (not in package:lints or package:dart_flutter_team_lints). Removed it from analysis_options.yaml and dropped the // ignore: avoid_redundant_argument_values comments in select_dialog_test.dart.

@github-actions

github-actions Bot commented Oct 23, 2026 •

Copy link
Copy Markdown

PR Health ⚠️

Health checks are rerunning. These details are out-of-date.

…ns.yaml

- Drop `avoid_redundant_argument_values` from `pkgs/cli_util/analysis_options.yaml` and remove the `// ignore: avoid_redundant_argument_values` comments in `pkgs/cli_util/test/select_dialog_test.dart`.
@kevmoo
kevmoo merged commit 495a9db into main Oct 23, 2026
37 checks passed
@kevmoo
kevmoo deleted the fix-ci-cli-util-process branch October 23, 2026 23:45
// Handle Ctrl+C and abort the dialog.
final sigintSub = ProcessSignal.sigint.watch().listen((_) {
if (!doneCompleter.isCompleted) {
doneCompleter.complete(null);

@lrhn lrhn Oct 25, 2026 •

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

I want the null.

I want (eventually) to make the parameter not be optional. It's bad API that you can always omit an argument, but it's a runtime error if the type parameter isn't nullable.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants