-
Notifications
You must be signed in to change notification settings - Fork 6k
[fuchsia] Create CF v2 Flutter runner. #29142
[fuchsia] Create CF v2 Flutter runner. #29142
Conversation
af5da45
to
45a11a7
Compare
@@ -354,6 +354,13 @@ void DartComponentControllerV2::Run() { | |||
loop_->Run(); | |||
|
|||
if (binding_.is_bound()) { | |||
// TODO(fxb/79871): This is likely a bug. We're taking the return_code |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
yeah, v2 doesn't have a good way to communicate the return code like a v1 component does. This is something we will need for other things outside of the runner so we should work with the CF team to figure out a plan. I think there will likely be some other lifecycle type service we need to start interacting with.
In the meantime. Can we just do a ZX_ERR_INTERNAL if the return code is not zero and ZX_OK otherwise?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Sounds good, will handle in a follow-up PR.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is a feature request that has come up before, it and sounds reasonable. We could probably have the ComponentController dispatch a FIDL event with the return code. In the meantime, converting to INTERNAL SGTM.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Opened fxb/86666 for handling that in CF. Thanks for the feedback Gary.
@gebressler @ypomortsev Thanks for reviewing our CF v2 port! Some additional context on this PR:
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM, but be extra cautious to test on smart_display and workstation due to the runner.cc changes
LGTM from me
…On Thu, Oct 14, 2021 at 10:22 AM Alexander Biggs ***@***.***> wrote:
***@***.**** commented on this pull request.
------------------------------
In shell/platform/fuchsia/flutter/component_v2.cc
<#29142 (comment)>:
> + FML_DCHECK(ns_fd.is_valid());
+
+ constexpr mode_t mode = O_RDONLY | O_DIRECTORY;
+
+ component_assets_directory_.reset(
+ openat(ns_fd.get(), assets_path.c_str(), mode));
+ FML_DCHECK(component_assets_directory_.is_valid());
+
+ component_data_directory_.reset(
+ openat(ns_fd.get(), data_path.c_str(), mode));
+ FML_DCHECK(component_data_directory_.is_valid());
+ }
+
+ // ComponentStartInfo::runtime_dir (optional).
+ if (start_info.has_runtime_dir()) {
+ runtime_dir_->Serve(fuchsia::io::OPEN_RIGHT_READABLE |
Tested with a Flutter CF v2 component this morning and this part is
crashing. https://paste.googleplex.com/6433282938896384 It seems like
maybe it doesn't like me trying to Serve this as a directory based on this
line:
[02662.474881][1924][2978][klog] INFO: #0 0x000001814b84b8f8 in vfs::internal::Node::IsDirectory(const vfs::internal::Node*) ../../fuchsia/sdk/linux/pkg/vfs_cpp/include/lib/vfs/cpp/internal/node.h:99 <<VMO#641510=blob-a84f3dfd>>+0x4d98f8 sp 0xa34f7f8cf0
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
<#29142 (review)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/AQB2JV4B56ZY4F2YEH5FBETUG4GVHANCNFSM5F3T27EA>
.
Triage notifications on the go with GitHub Mobile for iOS
<https://apps.apple.com/app/apple-store/id1477376905?ct=notification-email&mt=8&pt=524675>
or Android
<https://play.google.com/store/apps/details?id=com.github.android&referrer=utm_campaign%3Dnotification-email%26utm_medium%3Demail%26utm_source%3Dgithub>.
|
@arbreng Should I add the CQ tag? This looks good to go. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM w/ comments!
Also ignores: flutter#91906 2021-10-15 [email protected] [web] Add goldctl as a dependency in LUCI (flutter/engine#29168) 2021-10-15 [email protected] Revert "Set system bar appearance using WindowInsetsControllerCompat instead of the deprecated View#setSystemUiVisibility (flutter#29060)" (flutter/engine#29206) 2021-10-15 [email protected] Roll Dart SDK from e8c02a935741 to 42acd2ae8fa8 (1 revision) (flutter/engine#29205) 2021-10-15 [email protected] Roll Dart SDK from 9f3cd7a49814 to e8c02a935741 (1 revision) (flutter/engine#29204) 2021-10-15 [email protected] Roll Skia from 012f7146067a to b24bad31dc05 (3 revisions) (flutter/engine#29203) 2021-10-15 [email protected] Roll Skia from 72602b668e22 to 012f7146067a (1 revision) (flutter/engine#29202) 2021-10-15 [email protected] Roll Dart SDK from aaca2ac128ae to 9f3cd7a49814 (1 revision) (flutter/engine#29201) 2021-10-15 [email protected] Set the use_ios_simulator flag only on platforms where it is defined (iOS/Mac) (flutter/engine#29199) 2021-10-14 [email protected] [fuchsia] Create CF v2 Flutter runner. (flutter/engine#29142) 2021-10-14 [email protected] Roll Dart SDK from 82b0281cbcf3 to aaca2ac128ae (1 revision) (flutter/engine#29198) 2021-10-14 [email protected] Roll Skia from aa9656d8caa6 to 72602b668e22 (1 revision) (flutter/engine#29196) 2021-10-14 [email protected] Ignore implicit_dynamic_function analyzer error for js_util generic methods (flutter/engine#29192) 2021-10-14 [email protected] [web] use 'dart compile js' instead of 'dart2js' in web_ui and felt (flutter/engine#29179) 2021-10-14 [email protected] Roll Dart SDK from 081a57c06088 to 82b0281cbcf3 (3 revisions) (flutter/engine#29195) 2021-10-14 [email protected] Roll Skia from d0c7f636453b to aa9656d8caa6 (3 revisions) (flutter/engine#29194) 2021-10-14 [email protected] Set system bar appearance using WindowInsetsControllerCompat instead of the deprecated View#setSystemUiVisibility (flutter/engine#29060) 2021-10-14 [email protected] [UWP] Remove 1px offset to make root widget fully shown (flutter/engine#27922) 2021-10-14 [email protected] Roll Skia from ab19daec3b88 to d0c7f636453b (1 revision) (flutter/engine#29191) If this roll has caused a breakage, revert this CL and stop the roller using the controls here: https://autoroll.skia.org/r/flutter-engine-flutter-autoroll Please CC [email protected] on the revert to ensure that a human is aware of the problem. To file a bug in Flutter: https://github.com/flutter/flutter/issues/new/choose To report a problem with the AutoRoller itself, please file a bug: https://bugs.chromium.org/p/skia/issues/entry?template=Autoroller+Bug Documentation for the AutoRoller is here: https://skia.googlesource.com/buildbot/+doc/main/autoroll/README.md
Bug: fxb/50694
Tested: Ran V1 runner with
Spinning Square
example to verify that it doesn't crash. Still working on porting an existing Flutter component over to V2 to test the new runner. Unit tests will be created in a follow-up PR since I'm still not certain I'm doing things right in the V2 runner.This PR was optimized for two things:
Component
->ComponentV1
. No logic for the V2 runner is shared with the V1 runner (with the exception of theFileInNamespaceBuffer
utility).