Skip to content
This repository was archived by the owner on Feb 25, 2025. It is now read-only.

Conversation

@cbracken
Copy link
Member

@cbracken cbracken commented Dec 7, 2021

Dart VM flags are passed to Flutter via an fml::CommandLine::Option that
looks something like:

{"dart-flags, "--max_profile_depth 1,--trace_service"}

We perform a prefix match to handle cases where Dart VM options take
arguments.

Adding the comment since in a recent review I found myself wondering why
we're using a prefix match to begin with. While the original author had
forgotten, the good news is, he wrote a test that covers this exact
case. This comment just removes one level of indirection for future
readers.

No tests added since this is a comment-only change, and a test already
exists that covers this scenario.

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 and the C++, Objective-C, Java style guides.
  • I listed at least one issue that this PR fixes in the description above.
  • I added new tests to check the change I am making or feature I am adding, or Hixie said the PR is test-exempt. See testing the engine for instructions on
    writing and running engine tests.
  • I updated/added relevant documentation (doc comments with ///).
  • I signed the CLA.
  • All existing and new tests are passing.

If you need help, consider asking for advice on the #hackers-new channel on Discord.

Dart VM flags are passed to Flutter via an fml::CommandLine::Option that
looks something like:

   {"dart-flags, "--max_profile_depth 1,--trace_service"}

We perform a prefix match to handle cases where Dart VM options take
arguments.

Adding the comment since in a recent review I found myself wondering why
we're using a prefix match to begin with. While the original author had
forgotten, the good news is, he wrote a test that covers this exact
case. This comment just removes one level of indirection for future
readers.
@cbracken cbracken requested review from bdero and bkonyi December 7, 2021 21:38
@flutter-dashboard
Copy link

It looks like this pull request may not have tests. Please make sure to add tests before merging. If you need an exemption to this rule, contact Hixie on the #hackers channel in Chat.

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.

@cbracken cbracken added waiting for tree to go green This PR is approved and tested, but waiting for the tree to be green to land. and removed needs tests labels Dec 7, 2021
@cbracken cbracken merged commit 5672f9e into flutter:main Dec 7, 2021
@cbracken cbracken deleted the dartvm-flag-match-comment branch December 7, 2021 22:36
engine-flutter-autoroll added a commit to engine-flutter-autoroll/flutter that referenced this pull request Dec 8, 2021
zanderso pushed a commit to flutter/flutter that referenced this pull request Dec 8, 2021
* 9b74c21 Run iOS scenario apps on iPhone 11 and iOS 14 (flutter/engine#30104)

* 4108898 Add error handler for os.rmtree calls (flutter/engine#30169)

* 55c5e56 Don't run curl in verbose mode when --verbose set (flutter/engine#30170)

* a1fe531 Win32: Implement DispatchAccessibilityAction (flutter/engine#30187)

* a7a8024 Update buildroot to db6d037 (ToT). (flutter/engine#30171)

* 7ccf290 Revert "Run iOS scenario apps on iPhone 11 and iOS 14 (#30104)" (flutter/engine#30193)

* 1313e73 Add unconditional waits on fml::Semaphore. (flutter/engine#30165)

* 094ff9e Roll Fuchsia Mac SDK from EAlr46NQ8... to zMg5gNi2E... (flutter/engine#30190)

* a572ab5 Roll Fuchsia Linux SDK from WGMjaVH60... to s03VQc7lX... (flutter/engine#30191)

* 07c6f41 Roll Skia from f333f5614a9b to 06f3d68627c2 (24 revisions) (flutter/engine#30192)

* 8796f0f Update Swiftshader to dc0f131930 (flutter/engine#30188)

* c1e235d Add length guard to fix Windows build with VS2019 16.11.7 headers (flutter/engine#30189)

* 7831529 Roll Skia from 06f3d68627c2 to 1c4cf27965bd (2 revisions) (flutter/engine#30194)

* 5672f9e Document rationale for Dart VM flag prefix match (flutter/engine#30195)

* 1c10e68 Roll buildroot to 430b57c. (flutter/engine#30197)

* e32d04a Roll Skia from 1c4cf27965bd to 543b8681c7f2 (1 revision) (flutter/engine#30198)

* 6981c04 [ios platform view] fix overlay zPosition (flutter/engine#29930)

* efaccf0 renew cirrus key (flutter/engine#30186)

* 9b80c08 Roll Skia from 543b8681c7f2 to 00edeefab7f4 (1 revision) (flutter/engine#30200)

* 164045d Roll Fuchsia Mac SDK from zMg5gNi2E... to QeaP059wu... (flutter/engine#30203)

* 83b84d3 Roll Skia from 00edeefab7f4 to 21b8ccb7393c (3 revisions) (flutter/engine#30206)
engine-flutter-autoroll added a commit to engine-flutter-autoroll/flutter that referenced this pull request Dec 8, 2021
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

waiting for tree to go green This PR is approved and tested, but waiting for the tree to be green to land.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants