-
Notifications
You must be signed in to change notification settings - Fork 29.8k
Use const bool.fromEnvironment("dart.tool.dart2wasm") to detect dart2wasm #149996
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
Conversation
|
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. |
|
Golden file changes have been found for this pull request. Click here to view and triage (e.g. because this is an intentional change). If you are still iterating on this change and are not ready to resolve the images on the Flutter Gold dashboard, consider marking this PR as a draft pull request above. You will still be able to view image results on the dashboard, commenting will be silenced, and the check will not try to resolve itself until marked ready for review. For more guidance, visit Writing a golden file test for Reviewers: Read the Tree Hygiene page and make sure this patch meets those guidelines before LGTMing. |
|
test-exempt: code refactor with no semantic change |
|
Thanks @stuartmorgan & @osa1 ! |
|
The |
|
I'm not very familiar with flutter-gold, the framework channel on Discord is probably the best place to ask. |
flutter/flutter@32081aa...14df7be 2024-06-11 109111084+yaakovschectman@users.noreply.github.com Revert "Add tests for scaffold drawer and end drawer" (flutter/flutter#150045) 2024-06-11 32538273+ValentinVignal@users.noreply.github.com Add tests for scaffold drawer and end drawer (flutter/flutter#149383) 2024-06-11 36861262+QuncCccccc@users.noreply.github.com Add high-contrast theme (flutter/flutter#149779) 2024-06-11 goderbauer@google.com Manual Pub Roll (flutter/flutter#150025) 2024-06-10 chris@bracken.jp [docs] Per-platform desktop triage instructions (flutter/flutter#150019) 2024-06-10 greg@zulip.com Fix copy-paste-o in MethodChannel.invokeListMethod doc (flutter/flutter#149976) 2024-06-10 34871572+gmackall@users.noreply.github.com Unpin `camera_android` and remove its only usage (flutter/flutter#150017) 2024-06-10 47866232+chunhtai@users.noreply.github.com Fixes a bug where NavigatorState.pop does not consider any possible s� (flutter/flutter#150014) 2024-06-10 98614782+auto-submit[bot]@users.noreply.github.com Reverts "Reland: [CupertinoActionSheet] Match colors to native (#149568) (#150015)" (flutter/flutter#150021) 2024-06-10 dkwingsmt@users.noreply.github.com Reland: [CupertinoActionSheet] Match colors to native (#149568) (flutter/flutter#150015) 2024-06-10 15619084+vashworth@users.noreply.github.com Temporarily run Mac_arm64 framework_tests_misc on only Mac-13 (flutter/flutter#150009) 2024-06-10 47866232+chunhtai@users.noreply.github.com Fixes TextField hinttext in a11y_assessment (flutter/flutter#150007) 2024-06-10 kustermann@google.com Use const bool.fromEnvironment("dart.tool.dart2wasm") to detect dart2wasm (flutter/flutter#149996) 2024-06-10 engine-flutter-autoroll@skia.org Roll Packages from 8a2c4e4 to e95fe4a (3 revisions) (flutter/flutter#149997) 2024-06-10 ditman@gmail.com [web] Notify engine of handled PointerScrollEvents. (flutter/flutter#145500) 2024-06-10 greg@zulip.com Cut no-longer-accurate microtask reference in finalizeTree doc (flutter/flutter#149941) 2024-06-10 ttorii20@gmail.com Update hasTrailingSpaces (flutter/flutter#149698) 2024-06-10 mdebbar@google.com [web] Change `--web-renderer` default from `auto` to `canvaskit` (flutter/flutter#149773) 2024-06-10 jason-simmons@users.noreply.github.com Retain the toString method for subclasses of Key in profile/release mode (flutter/flutter#149926) 2024-06-10 mit@google.com Remove package:platform from issue template (flutter/flutter#149995) 2024-06-10 15619084+vashworth@users.noreply.github.com Revert "[CupertinoActionSheet] Match colors to native (#149568)" (flutter/flutter#149998) 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
…wasm (flutter#149996) Dart2Wasm doesn't officially support `dart:ffi` (only a small sketchy subset needed in flutter web engine). We have seen user reporting issues where existing packages don't work with dart2wasm due to using `dart.library.ffi` in `bool.fromEnvironment` or in conditional imports and it doing the wrong thing. So we're going to make `dart.library.ffi` `false` in the compiler. We therefore update the code to detect whether it runs under wasm via a new `dart.tool.dart2wasm` environment variable. This is a preparation for the change in dart2wasm which will start making `const bool.fromEnvironment('dart.library.ffi')` return `false` instead of `true`.
Dart2Wasm doesn't officially support
dart:ffi(only a small sketchy subset needed in flutter web engine). We have seen user reporting issues where existing packages don't work with dart2wasm due to usingdart.library.ffiinbool.fromEnvironmentor in conditional imports and it doing the wrong thing. So we're going to makedart.library.ffifalsein the compiler.We therefore update the code to detect whether it runs under wasm via a new
dart.tool.dart2wasmenvironment variable.This is a preparation for the change in dart2wasm which will start making
const bool.fromEnvironment('dart.library.ffi')returnfalseinstead oftrue.