Closed dvcrn closed 4 weeks ago
Thanks for reporting this issue. I just pushed a change which should fix this issue.
Let me know if that works or if you run into any other issues.
Hey, sorry I didn't have time to properly test this yet. It looks like the initial error is gone but I still can't export because the names of my types contain dots (like "my.service.Verification"). Is this supposed to be supported?
Hi,
I think that would be a good use-case to support, because that's probably the best way to track packages, but I don't think there's an easy fix at the moment. The export function in the library takes a package name argument, but that applies to the entire file and won't work per-message. The extension would need to do something like group all the messages by prefix and export to different files.
I think your best options for now are:
my_service_Verification
. This should make valid .proto
files out of the box and could be manually reorganized and renamed into several .proto
files with different package names.NAME_REGEX
at https://github.com/nccgroup/blackboxprotobuf/blob/master/lib/blackboxprotobuf/lib/protofile.py#L89 to allow dots in the names, but I don't think protobuf will consider it a valid .proto
. You would need to manually clean up the message definitions by splitting the messages into different files with different package declarations, and remove the prefix from the message names.
Hi, I'm trying to export a hand-mapped proto file from types, but getting 'cant write str to text stream'. Not fully sure how to start debugging this, so wanted to report here
Is exporting to proto currently broken?