pseudomuto / protokit Goto Github PK
View Code? Open in Web Editor NEWA starter kit for building protoc plugins. Rather than write your own, you can just use an existing one.
License: MIT License
A starter kit for building protoc plugins. Rather than write your own, you can just use an existing one.
License: MIT License
First off, this is a fantastic project. I was able to rewrite a squirrels nest of node code with this library in much fewer lines and the API here took care of a lot of the work I was doing before. Thank you!
One snag I hit was in implementing a compiler for a number of protos from different projects that I'm currently tying together by including each directory in my import path. I can't compile each separately because my target is format that doesn't support imports at all.
Because of the decision to only include those files in the output request, I have to glob all of the protos I have, which break a number of their import resolutions instead of just pointing the compiler at the one entry point proto that imports the rest.
Specifically this decision makes globbing multi project protos difficult. Is there any consideration to making that behavior configurable?
Thanks for the great repo @pseudomuto.
We have been using protokit as part of our process of auto-generating API reference documentation from proto files. We are experiencing some issues caused by the scrub
function in comments.go
Line 91 in dc6fd1c
The function obviously trims white spaces but this causes grammar issues in the resulting comments.
Rather than having a single line string, proto comments are often structured in the following way to improve readability in the actual proto:
// The definition of a book resource in the
// context of the university library.
message Book{}
Due to the scrub
function, this will cause the sentence to include thecontext rather than having a space between the words.
This is our primary use case for using comments so just want to check whether scrub
is actually used for cases I am not envisioning and whether I can submit a PR to remove it.
According to golang/protobuf#867, protobuf has supported to get message_type
in field type. If there can return *descriptor.FieldDescriptorProto
in types.go
Line 221 in c63c139
FileDescriptor
of field whose type=method
. Thanks a lot.A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.