| FazBrowse GitHub Viewer | Trending | | Home |
| Tools: [Download Repo ZIP] [Original HTTPS Page] |
…for code generation
There was a problem hiding this comment.
Adds tooling to inject nanopb .options constraints (e.g. max_size, int_size, max_count) directly into the temporary .proto files used by the Python protobuf code generator, so that the generated *_pb2.py descriptors carry those nanopb annotations and can be inspected at runtime via field.GetOptions().Extensions[nanopb_pb2.nanopb]. The bulk of the diff is regenerated *_pb2.py files reflecting the new embedded options.
Changes:
Copilot reviewed 1 out of 22 changed files in this pull request and generated no comments.
Show a summary per file| File | Description |
|---|---|
| bin/inject_nanopb_options.py | New script that injects nanopb .options into proto field declarations. |
| bin/regen-protobufs.sh | Calls the injector for each .options file before generating Python code. |
| meshtastic/protobuf/admin_pb2.py | Regenerated with embedded nanopb field options and updated offsets. |
| meshtastic/protobuf/apponly_pb2.py | Regenerated to embed nanopb settings option. |
| meshtastic/protobuf/atak_pb2.pyi | Regenerated stub; lost the epw trailing comment docstring. |
| meshtastic/protobuf/cannedmessages_pb2.py | Regenerated with messages max_size option. |
| meshtastic/protobuf/channel_pb2.py | Regenerated with PSK/name/index nanopb options. |
| meshtastic/protobuf/clientonly_pb2.py | Regenerated with DeviceProfile string size options. |
| meshtastic/protobuf/config_pb2.py | Regenerated with many size/int_size options across configs. |
| meshtastic/protobuf/connection_status_pb2.py | Regenerated with WiFi SSID size option. |
| meshtastic/protobuf/device_ui_pb2.py | Regenerated with UI int_size and string size options. |
| meshtastic/protobuf/deviceonly_pb2.py | Regenerated with UserLite/NodeInfoLite size options. |
| meshtastic/protobuf/interdevice_pb2.py | Regenerated with NMEA max size option. |
| meshtastic/protobuf/module_config_pb2.py | Regenerated with module config size/int_size options. |
| meshtastic/protobuf/mqtt_pb2.py | Regenerated with MapReport string size options. |
| meshtastic/protobuf/rtttl_pb2.py | Regenerated with ringtone max size. |
| meshtastic/protobuf/serial_hal_pb2.py | Regenerated with serial HAL data/error size options. |
| meshtastic/protobuf/storeforward_pb2.py | Regenerated with text max size option. |
| meshtastic/protobuf/telemetry_pb2.py | Regenerated with int_size/repeated count options. |
| meshtastic/protobuf/xmodem_pb2.py | Regenerated with seq/crc/buffer nanopb options. |
Sorry, something went wrong.
Codecov Report✅ All modified and coverable lines are covered by tests. @@ Coverage Diff @@
## master #922 +/- ##
=======================================
Coverage 61.57% 61.57%
=======================================
Files 25 25
Lines 4448 4448
=======================================
Hits 2739 2739
Misses 1709 1709
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Sentry.
|
Sorry, something went wrong.
| Back | FazBrowse Home | New Git URL |
This will let us look at things like max lengths, ostensible int sizes, and things like that if we want to, or library consumers want to.