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

Modify .proto file comments to be parsed by bisq-grpc-api-doc [#1] #6042

Merged
merged 4 commits into from
Feb 14, 2022

Conversation

ghubstan
Copy link
Contributor

This change should be low-risk, consisting mostly of adding some new comments, and deleting old

            ///////////////////// Banner Style /////////////////////

comments from .proto files (categorizing groups of protobuf message definitions). The gRPC API reference doc generator needs comments specific to each protobuf message definition, not groupings of messages.

The https://github.com/ghubstan/bisq-grpc-api-doc project also needs to be reviewed, and consideration could be given to determine if it should be added to the bisq repo as a new gradle sub-project.

Left as is are deprecated fields inside oneof message { } blocks. I tried to use the reserved keyword in these places to avoid having the api doc generator assume these commented, deprecated fields are describing the not-commented, valid fields below them, but the proto compiler does not allow use of the reserved keyword inside oneof message blocks. Luckily, the gRPC services do not directly depend on pb.proto message definitions such as PersistableEnvelope, and I can get away with leaving those comments alone. A solution to this problem may be needed in the the future.

This is the first step in the process of commenting Bisq's .proto files -- to be consumed by the gRPC API Reference generator script bisq-grpc-api-doc before producing Slate style Markdown content to be hosted on GitHub.

Reviews of the generated gRPC API Reference are expected to lead to API changes intended to improve useabiility. The .proto file comment -> reference doc review -> API change cycle will be an iterative process, and backward compatibility will probably be broken.

Note: I will try to remember to update the example API reference every time I submit comment changes to .proto files.

Based on 'master'

The bisq-grpc-api-doc generator needs comments spefic to protobuf
message definitions, not groups of message defs.  This kind of
information can be included in the message specific comments.

Also changed some existing comments, and added others to suggest
a commenting style for .proto message and field defs.
Banner comments were replace by simple service description comments.

Rpc methods were commented, some field level comments were moved to
to bisq-grpc-api-doc comment conventions.
@ghubstan ghubstan changed the title Modify .proto file comments to be parsed by bisq-grpc-api-doc Modify .proto file comments to be parsed by bisq-grpc-api-doc [#1] Feb 12, 2022
Copy link
Contributor

@ripcurlx ripcurlx left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

utACK - Comment changes are looking fine 👍

@ripcurlx ripcurlx merged commit b44a562 into bisq-network:master Feb 14, 2022
@ghubstan ghubstan deleted the 1-clean-protobuf-comments branch February 14, 2022 15:38
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants