Repository navigation
Fix JSON decoder exception when referencing different message’s enum - #59
Merged
andersfugmann merged 1 commit intoSep 26, 2026
Merged
Conversation
Owner
|
Thanks for the PR. I'll look at this over the weekend. I'd like to look at bit deeper to understand if we can solve the references differently rather than using the lazy keyword. Recursive modules does put some constraints on how other modules can be referenced. |
Owner
|
Looking a bit deeper, I think using |
andersfugmann
added a commit
to andersfugmann/opam-repository
that referenced
this pull request
Sep 27, 2026
CHANGES: - Add `package_service_name` to generated service modules, providing the complete protobuf service path directly (andersfugmann/ocaml-protoc-plugin#49, thanks @Nymphium) - Use binary mode for the plugin's standard input and output on Windows (andersfugmann/ocaml-protoc-plugin#51, thanks @linsyking) - Fix JSON decoder initialization when a message references an enum nested in another message (andersfugmann/ocaml-protoc-plugin#59, thanks @mbickers) - Read the complete protoc plugin request instead of treating a short input read as end-of-file (andersfugmann/ocaml-protoc-plugin#60, thanks @jeong-sik)
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Defer JSON enum mapping initialization until first use to avoid an exception when a message references another message’s nested enum.
I added a regression test. Without fix, test fails with
I hit this when working with the GTFS Realtime protocol: TripUpdate.StopTimeUpdate.departure_occupancy_status references the OccupancyStatus enum nested in VehiclePosition.
Thanks for maintaining this library!