You'll need to have v3.20+ of protobuf.
Note that they changed the versioning scheme and went from 3.20.1 to 4.21.0. Making it more confusing, in brew and Github, 4.21.x is shown as v21.x.
- Install the proto compiler with
brew install protobuf, or something like this. - Run
yarn test-proto
LHR round trip flow:
(Compiling the Proto)
lighthouse_result.proto -> protoc --python_out ... -> lighthouse_result.pb2
⭏
(used by)
(Making a Round Trip JSON) ⭏
lhr.json --> proto_preprocessor.js -> lhr_processed.json -> json_roundtrip_via_proto.py -> lhr.round_trip.json
- Clean out compiled proto and json with
yarn clean - Round trips might jumble the order of your JSON keys and lists!