Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Support Protobuf Any type #146

Open
edsko opened this issue May 16, 2024 · 1 comment
Open

Support Protobuf Any type #146

edsko opened this issue May 16, 2024 · 1 comment
Labels
enhancement New feature or request priority: low Minor enhancements

Comments

@edsko
Copy link
Collaborator

edsko commented May 16, 2024

See https://protobuf.dev/programming-guides/proto3/#any . Note that the status of Any is reported here as "Currently the runtime libraries for working with Any types are under development".

Supporting this is a bit awkward; following the spec exactly

import "google/protobuf/any.proto";

message ExampleMessage {
  google.protobuf.Any exampleField = 1;
}

currently results in Haskell code that imports

import qualified Proto.Google.Protobuf.Any

where that Proto. prefix depends on the location of the .proto definition using Any, as well as the precise way that protoc was invoked. Proper support for Any will probably require patching proto-lens-protoc (and possibly even requiring explicit support from protoc?).

@edsko edsko added enhancement New feature or request priority: low Minor enhancements labels May 16, 2024
@edsko
Copy link
Collaborator Author

edsko commented Jun 21, 2024

An additional complication here is what to do with ProtoJson (not yet implemented; #166). See Protocol Buffers, Part 3 — JSON Format for discussion.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request priority: low Minor enhancements
Projects
None yet
Development

No branches or pull requests

1 participant