Skip to content

Commit f050e47

Browse files
anpFuchsia Internal LUCI
authored andcommitted
[sc] Remove allowlist for structured_config.
We're not quite ready for OOT usage still but anything in fuchsia.git should be able to use the feature without expecting much churn. Fixed: 95369 Fixed: 68460 Change-Id: Ief7cc09097d8cd9f29e39062d42eaf371b4cff29 Reviewed-on: https://fuchsia-review.googlesource.com/c/fuchsia/+/679663 Commit-Queue: Adam Perry <adamperry@google.com> Reviewed-by: Gabe Schine <thatguy@google.com>
1 parent 48f8e29 commit f050e47

File tree

30 files changed

+10
-112
lines changed

30 files changed

+10
-112
lines changed

docs/development/components/structured_config.md

Lines changed: 4 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,5 @@
11
# Structured Configuration
22

3-
Caution: Structured configuration is an experimental, allowlisted feature. Its behavior and APIs
4-
are subject to change. The allowlist will be removed when the feature does not require active
5-
guidance from the Component Framework team. Follow [this bug][remove-allowlist-bug] for updates.
6-
If you encounter bugs, please file them against our [Monorail component][file-monorail-bug]!
7-
83
Structured configuration allows C++/Rust components to declare configuration schemas directly in
94
their manifest. Benefits of using structured configuration include:
105

@@ -13,24 +8,21 @@ their manifest. Benefits of using structured configuration include:
138
* Components read their configuration with statically-typed libraries.
149
* Component Framework only starts components with valid configuration.
1510
* Configuration can be viewed at runtime with `ffx` tooling.
11+
* Values can be set at runtime in tests with RealmBuilder.
1612

1713
To use structured configuration in your component, you must update build rules, declare a schema,
1814
define values, and generate a client library.
1915

2016
## Update build rules
2117

2218
To prevent cyclic dependencies when generating client libraries, define a
23-
`fuchsia_component_manifest` rule that compiles the component manifest. Add `structured_config` as
24-
a restricted feature for this manifest. Pass this compiled manifest GN label into the
25-
`fuchsia_component` rule.
19+
`fuchsia_component_manifest` rule that compiles the component manifest. Pass this compiled manifest
20+
GN label into the `fuchsia_component` rule.
2621

2722
```gn
2823
{% includecode gerrit_repo="fuchsia/fuchsia" gerrit_path="examples/components/config/cpp/BUILD.gn" region_tag="component" adjust_indentation="auto" %}
2924
```
3025

31-
Because structured config is an [experimental feature][restricted-features],
32-
these GN build rules must be added to the allowlist in [`//tools/cmc/build/restricted_features/BUILD.gn`][restricted-features-build-gn]
33-
3426
## Declare configuration schema
3527

3628
You must declare a configuration schema in a component's manifest. Structured config supports
@@ -234,9 +226,5 @@ a component.
234226

235227
Realm Builder validates the replaced value against the component's configuration schema.
236228

237-
[remove-allowlist-bug]: https://fxbug.dev/95369
238-
[file-monorail-bug]: https://bugs.fuchsia.dev/p/fuchsia/issues/entry?components=ComponentFramework%3EStructuredConfig&labels=ComponentFeedback
239-
[restricted-features]: /docs/development/components/build.md#restricted-features
240-
[restricted-features-build-gn]: https://cs.opensource.google/fuchsia/fuchsia/+/main:/tools/cmc/build/restricted_features/BUILD.gn
241229
[cml-ref-doc]: https://fuchsia.dev/reference/cml#config
242-
[rb-feature-matrix]: /docs/development/testing/components/realm_builder.md#language-feature-matrix
230+
[rb-feature-matrix]: /docs/development/testing/components/realm_builder.md#language-feature-matrix

examples/assembly/structured_config/configured_by_assembly/BUILD.gn

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,6 @@ rustc_binary("bin") {
1212

1313
fuchsia_component("to_configure") {
1414
manifest = "meta/to_configure.cml"
15-
restricted_features = [ "structured_config" ]
1615
deps = [ ":bin" ]
1716
}
1817

examples/components/config/cpp/BUILD.gn

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,6 @@ executable("bin") {
3939
fuchsia_component_manifest("manifest") {
4040
component_name = "config_example"
4141
manifest = "meta/config_example.cml"
42-
restricted_features = [ "structured_config" ]
4342
}
4443

4544
fuchsia_component("component") {

examples/components/config/rust/BUILD.gn

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,6 @@ rustc_binary("bin") {
4141
fuchsia_component_manifest("manifest") {
4242
component_name = "config_example"
4343
manifest = "meta/config_example.cml"
44-
restricted_features = [ "structured_config" ]
4544
}
4645

4746
fuchsia_component("component") {

sdk/lib/sys/component/cpp/tests/BUILD.gn

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -129,7 +129,6 @@ fuchsia_component_manifest("echo_server_sc_manifest") {
129129
testonly = true
130130
component_name = "echo_server_sc"
131131
manifest = "meta/echo_server_sc.cml"
132-
restricted_features = [ "structured_config" ]
133132
}
134133

135134
fuchsia_component("echo_server_sc") {

src/bringup/bin/console/BUILD.gn

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,6 @@ import("//build/test.gni")
88
fuchsia_component_manifest("manifest") {
99
component_name = "console"
1010
manifest = "meta/console.cml"
11-
restricted_features = [ "structured_config" ]
1211
}
1312

1413
fuchsia_structured_config_cpp_elf_lib("console_config") {

src/connectivity/wlan/wlanstack/BUILD.gn

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -95,7 +95,6 @@ rustc_binary("bin") {
9595
fuchsia_component_manifest("wlanstack-manifest") {
9696
component_name = "wlanstack"
9797
manifest = "meta/wlanstack.cml"
98-
restricted_features = [ "structured_config" ]
9998
}
10099

101100
fuchsia_component("wlanstack-comp") {

src/diagnostics/archivist/BUILD.gn

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -182,13 +182,11 @@ archivist_optimized_binary("bin") {
182182
fuchsia_component_manifest("root-manifest") {
183183
manifest = "meta/archivist.cml"
184184
component_name = "archivist"
185-
restricted_features = [ "structured_config" ]
186185
}
187186

188187
fuchsia_component_manifest("archivist-for-embedding-v2-manifest") {
189188
manifest = "meta/archivist-for-embedding.cml"
190189
component_name = "archivist-for-embedding"
191-
restricted_features = [ "structured_config" ]
192190
}
193191

194192
# fxbug.dev/83213 Retain this component while out of tree tests depend on it

src/diagnostics/archivist/tests/v2/BUILD.gn

Lines changed: 0 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -86,7 +86,6 @@ rustc_test("integration_tests_bin") {
8686
fuchsia_component_manifest("with-log-connector-manifest") {
8787
manifest = "meta/archivist_for_integration_with_log_connector.cml"
8888
component_name = "archivist_with_log_connector"
89-
restricted_features = [ "structured_config" ]
9089
}
9190

9291
fuchsia_component("archivist-for-integration-with-log-connector") {
@@ -98,7 +97,6 @@ fuchsia_component("archivist-for-integration-with-log-connector") {
9897
fuchsia_component_manifest("with-klog-manifest") {
9998
manifest = "meta/archivist_with_klog.cml"
10099
component_name = "archivist_with_klog"
101-
restricted_features = [ "structured_config" ]
102100
}
103101

104102
fuchsia_component("archivist-with-klog") {
@@ -110,7 +108,6 @@ fuchsia_component("archivist-with-klog") {
110108
fuchsia_component_manifest("for-integration-manifest") {
111109
manifest = "meta/archivist_for_integration.cml"
112110
component_name = "archivist"
113-
restricted_features = [ "structured_config" ]
114111
}
115112

116113
fuchsia_component("archivist-for-integration") {
@@ -122,7 +119,6 @@ fuchsia_component("archivist-for-integration") {
122119
fuchsia_component_manifest("small-caches-manifest") {
123120
manifest = "meta/archivist-with-small-caches.cml"
124121
component_name = "archivist-with-small-caches"
125-
restricted_features = [ "structured_config" ]
126122
}
127123

128124
fuchsia_component("archivist-with-small-caches") {
@@ -134,7 +130,6 @@ fuchsia_component("archivist-with-small-caches") {
134130
fuchsia_component_manifest("with-feedback-filtering-manifest") {
135131
manifest = "meta/archivist_for_integration.cml"
136132
component_name = "archivist-with-feedback-filtering"
137-
restricted_features = [ "structured_config" ]
138133
}
139134

140135
fuchsia_component("archivist-with-feedback-filtering") {
@@ -146,7 +141,6 @@ fuchsia_component("archivist-with-feedback-filtering") {
146141
fuchsia_component_manifest("with-legacy-metrics-filtering-manifest") {
147142
manifest = "meta/archivist_for_integration.cml"
148143
component_name = "archivist-with-legacy-metrics-filtering"
149-
restricted_features = [ "structured_config" ]
150144
}
151145

152146
fuchsia_component("archivist-with-legacy-metrics-filtering") {
@@ -158,7 +152,6 @@ fuchsia_component("archivist-with-legacy-metrics-filtering") {
158152
fuchsia_component_manifest("with-feedback-filtering-disabled-manifest") {
159153
manifest = "meta/archivist_for_integration.cml"
160154
component_name = "archivist-with-feedback-filtering-disabled"
161-
restricted_features = [ "structured_config" ]
162155
}
163156

164157
fuchsia_component("archivist-with-feedback-filtering-disabled") {

src/diagnostics/detect/BUILD.gn

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -69,7 +69,6 @@ rustc_library("lib") {
6969
fuchsia_component_manifest("triage-detect-manifest") {
7070
manifest = "meta/triage-detect.cml"
7171
component_name = "triage-detect"
72-
restricted_features = [ "structured_config" ]
7372
}
7473

7574
fuchsia_structured_config_values("triage-detect-prod-config") {

0 commit comments

Comments
 (0)