8000 [flutter_tools] skip web renderer defines unless web target is picked by jonahwilliams · Pull Request #75160 · flutter/flutter · GitHub
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content

[flutter_tools] skip web renderer defines unless web target is picked #75160

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

Merged
merged 2 commits into from
Feb 2, 2021

Conversation

jonahwilliams
Copy link
Member

Fixes #75157

Don't pass web renderer dart-defines unless the device is a JavaScript device. TODO, where those tests at.

8000
@flutter-dashboard flutter-dashboard bot added the tool Affects the "flutter" command-line tool. See also t: labels. label Feb 1, 2021
@google-cla google-cla bot added the cla: yes label Feb 1, 2021
@@ -805,7 +805,7 @@ abstract class FlutterCommand extends Command<void> {
///
/// Throws a [ToolExit] if the current set of options is not compatible with
/// each other.
Future<BuildInfo> getBuildInfo({ BuildMode forcedBuildMode }) async {
Future<BuildInfo> getBuildInfo({ BuildMode forcedBuildMode, bool updateWebDefines = true }) async {
Copy link
Member

Choose a reason for hiding this comment

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

Passing along a bool for web mode seems a bit special purpose. Is there something that could be passed here instead that would convey the same thing, but which could also encode other platforms. Maybe TargetPlatform?

Copy link
Member Author
@jonahwilliams jonahwilliams Feb 1, 2021

Choose a reason for hiding this comment

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

Definitely. though in this case we can have multiple target platforms - I could pass a Set< TargetPlatform> . I think we should (in due time) move the update to the web dart defines into the web build targets and resident web runner, since that is very web specific.

Copy link
Member Author

Choose a reason for hiding this comment

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

That would remove the need to handle any target platform logic here

Copy link
Member

Choose a reason for hiding this comment

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

If the change to move the logic into the web-specific code is small, that does seem like a better place, but if that change will be higher-risk, then filing an issue and adding a TODO sgtm.

@jonahwilliams jonahwilliams marked this pull request as ready for review February 1, 2021 21:30
@jonahwilliams
Copy link
Member Author

I tried to keep this change small to reduce the risk for a cherry pick. We do still have time to rethink how we're setting the web defines before the release. LMK @zanderso

@jonahwilliams
Copy link
Member Author

I think there isn't really any harm in setting this define for run in all cases, except the windows bug. If this is a short term fix, then as a long term fix maybe we just revert this after the base64 encoding change to dart-defines?

@jonahwilliams jonahwilliams merged commit aebf548 into flutter:master Feb 2, 2021
@jonahwilliams jonahwilliams deleted the conditional_dart_define branch February 2, 2021 17:05
jonahwilliams added a commit that referenced this pull request Feb 2, 2021
christopherfujino added a commit that referenced this pull request Feb 11, 2021
…#75804)

* Added a ReorderableListView.builder constructor (#74697)

Added constructor parameters to the ReorderableList that were missing from ScrollView. Also replace a lot of doc comments with macro templates to reduce duplication.

* [flutter_tools] handle further devtools NPE (#74764)

* [flutter_tools] skip web renderer defines unless web target is picked (#75160)

* Catch VM Service disappearance from run/attach handler code (#75298)

* [flutter_tools] handle null package (#75336)

* Return an empty FlutterViews list when the service disappears (#75301)

* fix analyzer

* Apply Engine Cherrypicks

Co-authored-by: Darren Austin <darrenaustin@google.com>
Co-authored-by: Jonah Williams <jonahwilliams@google.com>
Co-authored-by: Jenn Magder <magder@google.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
tool Affects the "flutter" command-line tool. See also t: labels.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Mitigation for windows build issue with dart-defines
2 participants
0