-
Notifications
You must be signed in to change notification settings - Fork 27.3k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Mark defaultTargetPlatform as constant for non-debug non-web builds. #141105
Mark defaultTargetPlatform as constant for non-debug non-web builds. #141105
Conversation
9d936af
to
b65cb3d
Compare
Note that I haven't marked
above, as I'm not sure what, if any, test would be useful for this. |
a831652
to
d4d244b
Compare
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 "@test-exemption-reviewer" in the #hackers channel in Chat (don't just cc them here, they won't see it! Use Discord!). 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. |
Is |
test-exempt: optimization |
All VM related pragmas are documented at runtime/docs/pragmas.md |
@matanlurey points out (correctly) that it'd be nice to test that in production mode we do throw for setting the debug flag here. do we have a harness for testing things in production mode? if we don't i think this probably doesn't justify the cost of adding one, but if we do, it'd be nice to add this to it. |
3055ed6
to
4e1c862
Compare
I'll take a look around and see if I find one, and if I do then add it before merging. |
I didn't find a harness for testing non-debug-only code when I looked around, and from Discord it seems like no one else knows of one either to point me at, so I'm going to ship this as is. |
flutter/flutter@5dea6b9...3ee8ff2 2024-01-22 engine-flutter-autoroll@skia.org Roll Flutter Engine from 40c5e9ce6596 to c49989292fc1 (1 revision) (flutter/flutter#141966) 2024-01-22 engine-flutter-autoroll@skia.org Roll Packages from 129e08c to e4cbf23 (11 revisions) (flutter/flutter#141962) 2024-01-22 sstrickl@google.com Mark defaultTargetPlatform as constant for non-debug non-web builds. (flutter/flutter#141105) 2024-01-22 tessertaha@gmail.com Fix `shape` and `collapsedShape` isn't applied to `ExpansionTile`'s splash ink (flutter/flutter#141777) 2024-01-22 dacoharkes@google.com Reapply "Native assets: roll deps" (#141748) (flutter/flutter#141864) 2024-01-22 engine-flutter-autoroll@skia.org Roll Flutter Engine from 11c585f48b77 to 40c5e9ce6596 (1 revision) (flutter/flutter#141956) 2024-01-22 tessertaha@gmail.com Update `ToggleButtons`, `ExpansionPanel`, and `ExpandIcon` tests for Material 3 (flutter/flutter#141868) 2024-01-22 engine-flutter-autoroll@skia.org Roll Flutter Engine from c485c574fb1d to 11c585f48b77 (1 revision) (flutter/flutter#141952) 2024-01-22 engine-flutter-autoroll@skia.org Roll Flutter Engine from a7b207d5a1fe to c485c574fb1d (1 revision) (flutter/flutter#141951) If this roll has caused a breakage, revert this CL and stop the roller using the controls here: https://autoroll.skia.org/r/flutter-packages Please CC bmparr@google.com,rmistry@google.com,stuartmorgan@google.com 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
@eliasyishak To follow up here, were there any issues we need to be aware of? |
Elias reached out to me over chat and it turned out to be a flake after further investigation, hence why no revert happened. |
flutter/flutter@5dea6b9...3ee8ff2 2024-01-22 engine-flutter-autoroll@skia.org Roll Flutter Engine from 40c5e9ce6596 to c49989292fc1 (1 revision) (flutter/flutter#141966) 2024-01-22 engine-flutter-autoroll@skia.org Roll Packages from 129e08c to e4cbf23 (11 revisions) (flutter/flutter#141962) 2024-01-22 sstrickl@google.com Mark defaultTargetPlatform as constant for non-debug non-web builds. (flutter/flutter#141105) 2024-01-22 tessertaha@gmail.com Fix `shape` and `collapsedShape` isn't applied to `ExpansionTile`'s splash ink (flutter/flutter#141777) 2024-01-22 dacoharkes@google.com Reapply "Native assets: roll deps" (#141748) (flutter/flutter#141864) 2024-01-22 engine-flutter-autoroll@skia.org Roll Flutter Engine from 11c585f48b77 to 40c5e9ce6596 (1 revision) (flutter/flutter#141956) 2024-01-22 tessertaha@gmail.com Update `ToggleButtons`, `ExpansionPanel`, and `ExpandIcon` tests for Material 3 (flutter/flutter#141868) 2024-01-22 engine-flutter-autoroll@skia.org Roll Flutter Engine from c485c574fb1d to 11c585f48b77 (1 revision) (flutter/flutter#141952) 2024-01-22 engine-flutter-autoroll@skia.org Roll Flutter Engine from a7b207d5a1fe to c485c574fb1d (1 revision) (flutter/flutter#141951) If this roll has caused a breakage, revert this CL and stop the roller using the controls here: https://autoroll.skia.org/r/flutter-packages Please CC bmparr@google.com,rmistry@google.com,stuartmorgan@google.com 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
This PR adds the Dart VM
vm:platform-const-if
pragma introduced in dart-lang/sdk@57a1168875 to thedefaultTargetPlatform
property, allowing it to be computed as if it was a constant field in non-debug AOT builds. In particular, this means that platform-specific code executed conditionally based on this property can be tree-shaken in release builds. Note that this PR changesdefaultTargetPlatform
to only allow overriding viadebugDefaultTargetPlatformOverride
in debug builds, and makes it so that compilation throws an error if code assigns todebugDefaultTargetPlatformOverride
in other build modes.Related issue: #14233
Pre-launch Checklist
///
).If you need help, consider asking for advice on the #hackers-new channel on Discord.