Skip to content

Conversation

@bartekpacia
Copy link
Member

@bartekpacia bartekpacia commented Mar 8, 2023

This PR standarizes the methods used to parse command-line flags and options.

Fixes #105263 as discussed in #105263 (comment).

Pre-launch Checklist

  • I read the Contributor Guide and followed the process outlined there for submitting PRs.
  • I read the Tree Hygiene wiki page, which explains my responsibilities.
  • I read and followed the Flutter Style Guide, including Features we expect every widget to implement.
  • I signed the CLA.
  • I listed at least one issue that this PR fixes in the description above.
  • I updated/added relevant documentation (doc comments with ///).
  • I added new tests to check the change I am making, or this PR is test-exempt.
  • All existing and new tests are passing.

@flutter-dashboard flutter-dashboard bot added the tool Affects the "flutter" command-line tool. See also t: labels. label Mar 8, 2023
@bartekpacia
Copy link
Member Author

bartekpacia commented Mar 8, 2023

The 3 test failures (Mac tool_tests_commands, Windows tool_tests_commands, tool_tests-commands-linux) are coming from the single group in test/commands.shard/hermetic/run_test.dartusageValues. I think there's a bug in that test that became visible just now that boolArg throws if argResults is null (instead of falling back to false, as it did before).

It crashes in these lines: 676, 699, and a couple of the same ones in usageValues group.

Crashes in these lines come from here in RunCommand.usageValues. The tests that fail don't call run() so argResults are null, and hence the crash.

@christopherfujino @jmagman

@bartekpacia
Copy link
Member Author

Oh, I think I found a fix :)

@bartekpacia bartekpacia marked this pull request as ready for review March 8, 2023 17:12
@bartekpacia
Copy link
Member Author

Hmm, looks like the Mac module_custom_host_app_name_test has timed out. Don't know why's that.

Copy link
Contributor

@christopherfujino christopherfujino left a comment

Choose a reason for hiding this comment

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

LGTM

Copy link
Contributor

@andrewkolos andrewkolos left a comment

Choose a reason for hiding this comment

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

LGTM with nit

@christopherfujino christopherfujino added autosubmit Merge PR when tree becomes green via auto submit App and removed tool Affects the "flutter" command-line tool. See also t: labels. labels Mar 13, 2023
@auto-submit auto-submit bot removed the autosubmit Merge PR when tree becomes green via auto submit App label Mar 13, 2023
@auto-submit
Copy link
Contributor

auto-submit bot commented Mar 13, 2023

auto label is removed for flutter/flutter, pr: 122184, due to - This commit is not mergeable and has conflicts. Please rebase your PR and fix all the conflicts.

@christopherfujino
Copy link
Contributor

Looks like you have a conflict with #121903

@bartekpacia
Copy link
Member Author

Yup, thanks for heads up, fixed :)

@christopherfujino christopherfujino added the autosubmit Merge PR when tree becomes green via auto submit App label Mar 13, 2023
@bartekpacia
Copy link
Member Author

Google testing failed. Please contact a Google developer to investigate.

Oopsie, @christopherfujino?

@auto-submit auto-submit bot removed the autosubmit Merge PR when tree becomes green via auto submit App label Mar 13, 2023
@auto-submit
Copy link
Contributor

auto-submit bot commented Mar 13, 2023

auto label is removed for flutter/flutter, pr: 122184, due to - The status or check suite Google testing has failed. Please fix the issues identified (or deflake) before re-applying this label.

@christopherfujino christopherfujino added the autosubmit Merge PR when tree becomes green via auto submit App label Mar 13, 2023
@auto-submit auto-submit bot merged commit 37fc9ed into flutter:master Mar 13, 2023
@bartekpacia bartekpacia deleted the refactor/cleanup_cli_arg_accessors branch March 13, 2023 21:20
engine-flutter-autoroll added a commit to engine-flutter-autoroll/packages that referenced this pull request Mar 14, 2023
engine-flutter-autoroll added a commit to engine-flutter-autoroll/packages that referenced this pull request Mar 14, 2023
engine-flutter-autoroll added a commit to engine-flutter-autoroll/packages that referenced this pull request May 10, 2023
engine-flutter-autoroll added a commit to engine-flutter-autoroll/packages that referenced this pull request May 10, 2023
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

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[flutter_tools] boolArg() should be non-nullable, and throw if the flag doesn't exist

3 participants