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

Commit 37db0e8

Browse files
committed
[fuchsia] Update Inspect library usage
The new Inspect library uses InspectSink as described in RFC-168 [1]. Additionally it's using the new CPP bindings instead of the deprecated HLCPP bindings. [1]: https://fuchsia.dev/fuchsia-src/contribute/governance/rfcs/0168_exposing_inspect_through_inspectsink?hl=en Bug: https://g-issues.fuchsia.dev/issues/320785253
1 parent ee297c0 commit 37db0e8

File tree

22 files changed

+37
-56
lines changed

22 files changed

+37
-56
lines changed

shell/platform/fuchsia/dart_runner/BUILD.gn

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -58,9 +58,10 @@ template("runner_sources") {
5858
"$fuchsia_sdk_root/pkg:async-loop-cpp",
5959
"$fuchsia_sdk_root/pkg:async-loop-default",
6060
"$fuchsia_sdk_root/pkg:fidl_cpp",
61+
"$fuchsia_sdk_root/pkg:inspect",
62+
"$fuchsia_sdk_root/pkg:inspect_component_cpp",
6163
"$fuchsia_sdk_root/pkg:sys_cpp",
6264
"$fuchsia_sdk_root/pkg:sys_cpp_testing",
63-
"$fuchsia_sdk_root/pkg:sys_inspect_cpp",
6465
"$fuchsia_sdk_root/pkg:trace",
6566
"$fuchsia_sdk_root/pkg:vfs_cpp",
6667
"$fuchsia_sdk_root/pkg:zx",
@@ -99,7 +100,7 @@ template("runner") {
99100

100101
deps = [
101102
":" + target_name + "_runner_sources",
102-
"$fuchsia_sdk_root/pkg:sys_inspect_cpp",
103+
"$fuchsia_sdk_root/pkg:inspect_component_cpp",
103104
"$fuchsia_sdk_root/pkg:trace-provider-so",
104105
] + extra_deps
105106
}

shell/platform/fuchsia/dart_runner/main.cc

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44

55
#include <lib/async-loop/cpp/loop.h>
66
#include <lib/async-loop/default.h>
7-
#include <lib/sys/inspect/cpp/component.h>
7+
#include <lib/inspect/component/cpp/component.h>
88
#include <lib/trace-provider/provider.h>
99
#include <lib/trace/event.h>
1010

shell/platform/fuchsia/dart_runner/meta/common.shard.cml

Lines changed: 2 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -2,16 +2,6 @@
22
// Use of this source code is governed by a BSD-style license that can be
33
// found in the LICENSE file.
44
{
5-
capabilities: [
6-
// Required for inspect.
7-
// Copied from inspect/client.shard.cml because out-of-tree doesn't
8-
// have support for CML includes from the SDK.
9-
{
10-
directory: "diagnostics",
11-
rights: [ "connect" ],
12-
path: "/diagnostics",
13-
},
14-
],
155
use: [
166
// This is used by the Dart VM to communicate from Dart code to C++ code.
177
{
@@ -36,6 +26,7 @@
3626
protocol: [
3727
"fuchsia.device.NameProvider", // For fdio uname()
3828
"fuchsia.feedback.CrashReporter",
29+
"fuchsia.inspect.InspectSink", // For inspect
3930
"fuchsia.intl.PropertyProvider", // For dartVM timezone support
4031
"fuchsia.logger.LogSink", // For syslog
4132
"fuchsia.net.name.Lookup", // For fdio sockets
@@ -50,15 +41,5 @@
5041
from: "parent",
5142
availability: "optional",
5243
},
53-
],
54-
expose: [
55-
// Required for inspect.
56-
// Copied from inspect/client.shard.cml because out-of-tree doesn't
57-
// have support for CML includes from the SDK.
58-
{
59-
directory: "diagnostics",
60-
from: "self",
61-
to: "framework",
62-
},
63-
],
44+
]
6445
}

shell/platform/fuchsia/dart_runner/tests/startup_integration_test/dart_aot_runner/dart-aot-runner-integration-test.cc

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -83,6 +83,7 @@ TEST_F(RealmBuilderTest, DartRunnerStartsUp) {
8383
Protocol{"fuchsia.posix.socket.Provider"},
8484
Protocol{"fuchsia.intl.PropertyProvider"},
8585
Protocol{"fuchsia.vulkan.loader.Loader"},
86+
Protocol{"fuchsia.inspect.InspectSink"},
8687
Directory{"config-data"}},
8788
.source = ParentRef(),
8889
.targets = {kDartAotRunnerRef, kDartAotEchoServerRef}});

shell/platform/fuchsia/dart_runner/tests/startup_integration_test/dart_aot_runner/meta/dart-aot-runner-integration-test.cml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,7 @@
1919
// Offer capabilities needed by components in this test realm.
2020
// Keep it minimal, describe only what's actually needed.
2121
protocol: [
22+
"fuchsia.inspect.InspectSink",
2223
"fuchsia.logger.LogSink",
2324
"fuchsia.sysmem.Allocator",
2425
"fuchsia.tracing.provider.Registry",

shell/platform/fuchsia/dart_runner/tests/startup_integration_test/dart_jit_runner/dart-jit-runner-integration-test.cc

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -81,6 +81,7 @@ TEST_F(RealmBuilderTest, DartRunnerStartsUp) {
8181
Protocol{"fuchsia.tracing.provider.Registry"},
8282
Protocol{"fuchsia.posix.socket.Provider"},
8383
Protocol{"fuchsia.intl.PropertyProvider"},
84+
Protocol{"fuchsia.inspect.InspectSink"},
8485
Directory{"config-data"}},
8586
.source = ParentRef(),
8687
.targets = {kDartJitRunnerRef, kDartJitEchoServerRef}});

shell/platform/fuchsia/dart_runner/tests/startup_integration_test/dart_jit_runner/meta/dart-jit-runner-integration-test.cml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,7 @@
1919
// Offer capabilities needed by components in this test realm.
2020
// Keep it minimal, describe only what's actually needed.
2121
protocol: [
22+
"fuchsia.inspect.InspectSink",
2223
"fuchsia.logger.LogSink",
2324
"fuchsia.sysmem.Allocator",
2425
"fuchsia.tracing.provider.Registry",

shell/platform/fuchsia/flutter/BUILD.gn

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -140,8 +140,8 @@ template("runner_sources") {
140140

141141
public_deps = [
142142
"$fuchsia_sdk_root/pkg:inspect",
143+
"$fuchsia_sdk_root/pkg:inspect_component_cpp",
143144
"$fuchsia_sdk_root/pkg:sys_cpp",
144-
"$fuchsia_sdk_root/pkg:sys_inspect_cpp",
145145
"//flutter/shell/platform/fuchsia/runtime/dart/utils",
146146
] + flutter_public_deps
147147

shell/platform/fuchsia/flutter/accessibility_bridge.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@
1212
#include <fuchsia/accessibility/semantics/cpp/fidl.h>
1313
#include <fuchsia/ui/gfx/cpp/fidl.h>
1414
#include <lib/fidl/cpp/binding_set.h>
15-
#include <lib/sys/inspect/cpp/component.h>
15+
#include <lib/inspect/component/cpp/component.h>
1616
#include <zircon/types.h>
1717

1818
#include <memory>

shell/platform/fuchsia/flutter/main.cc

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
// found in the LICENSE file.
44

55
#include <lib/async-loop/cpp/loop.h>
6-
#include <lib/sys/inspect/cpp/component.h>
6+
#include <lib/inspect/component/cpp/component.h>
77
#include <lib/trace-provider/provider.h>
88
#include <lib/trace/event.h>
99

0 commit comments

Comments
 (0)