commit | 736bd42fbd9ff1c2c6868bea2104198242488fe3 | [log] [tgz] |
---|---|---|
author | Alex Zaslavsky <azaslavsky@fuchsia.infra.roller.google.com> | Tue Mar 22 21:57:18 2022 +0000 |
committer | Copybara-Service <copybara-worker@google.com> | Tue Mar 22 14:58:49 2022 -0700 |
tree | 02da9ef31e899eed3fc7542e8601a11680b942dd | |
parent | 81c6d26d1cb2f3557be263e6336965c09fed17f6 [diff] |
[roll] Roll fuchsia [fidl][codec] Introduce Payload wrapper for Struct This change is a refactor, in preparation for I6b2d691067350993a309f573cf3c4360b7810204. The purpose here is to change the manner in which fidl_codec represents payloads internally, to abstract away the fact that (as of this CL) they are merely Structs. Thus, while previously requests/response were literal `Struct` objects, and the parameters thereof were represented as `StructMember` instances, those have now been replaced by `Payload` and `Parameter` respectively. In total, this change introduces 4 new classes: * `Payloadable` is a base class for "payloadable" type definitions (currently just structs, but as of the next change, tables and unions as well). Data and capabilities that will be common to all payloadable types are now stored on the base class. `Struct` is now a derived `final` derivation of `Payloadable`. * `PayloadValue` is a base class for payloadable values in much the same way. * `Parameter` is an abstract representation of a method parameter. For structs, this enumerates every argument (ie, the "flattened" representation), while for tables and unions this will just be a reference to the underlying type (ie, the "unflattened" representation). * 'Payload' is a container for `Payloadable` reference. In much the same manner that say `UnionMember` stores both the description of the member as well as its `Type` definition, `Payload` does the same for the top-level description + `Type` describing the entire message. With this change in place, adding support for union and table payloads should be a simple case of extending `Union|Table` to inherit from `Payloadable` and `UnionValue|TableValue` to inherit from `PayloadableValue`. Test: fx test fidl-codex-tests fidlcat Original-Bug: 88343 Original-Reviewed-on: https://fuchsia-review.googlesource.com/c/fuchsia/+/615347 Original-Revision: fd4d5d0976fc62715affbf58c0359626df90612c GitOrigin-RevId: 0e96ed982934de53547bcb8a1661591155f35baf Change-Id: I2cdfb45a77b39c1a9c0d009c118498a0af892028
This repository contains Fuchsia's Global Integration manifest files.
All changes should be made to the internal version of this repository. Our infrastructure automatically updates this version when the internal one changes.
Currently all changes must be made by a Google employee. Non-Google employees wishing to make a change can ask for assistance via the IRC channel #fuchsia
on Freenode.
First install Jiri.
Next run:
$ jiri init $ jiri import minimal https://fuchsia.googlesource.com/integration $ jiri update
Third party projects should have their own subdirectory in ./third_party
.