[SM] Generate C++ sources for all manifest targets
Changes the service_manifest target to emit C++ sources for that specific Manifest definition. Previously we only generated sources for catalog_cpp_source targets, which aggregated JSON data from multiple service_manifest targets. Every service_manifest GN template thus now emits two artifacts: the same collated JSON as before (including packaged services and overlays), since embedders use this to generate runtime manifest resources; and a new source_set target which expresses the same manifest in terms of C++ sources, with proper dependencies on each dependency manifest's source_set. The point of this is to make it possible for incremental migration away from generated code and over to code that lives in the source tree. For example, many implementations of ContentBrowserClient override GetServiceManifestOverlay() and use parsed JSON resources at runtime to construct a Manifest object. After this change, any of those cases can be individually converted to use the generated source_set instead of the generated JSON, and the JSON resource can be deleted. Once this lands, catalog targets can also be eliminated and replaced by helpers in the tree which return the same lists of manifests that the catalog-generated code returns now. Finally, after all that, remaining service manifests can be (mostly) independently pulled out of generated code. The end result will be: no more JSON manifests anywhere, no more catalog() or catalog_cpp_source() GN targets, and no more service_manifest() GN targets. TBR=sky@chromium.org Bug: 895616 Change-Id: Ie3d53a96ac79952383e473f23d390583306be2fa Reviewed-on: https://chromium-review.googlesource.com/c/1388158 Commit-Queue: Ken Rockot <rockot@google.com> Reviewed-by:Ken Rockot <rockot@google.com> Reviewed-by:
Oksana Zhuravlova <oksamyt@chromium.org> Reviewed-by:
Dirk Pranke <dpranke@chromium.org> Cr-Commit-Position: refs/heads/master@{#618718}
Showing
Please register or sign in to comment