-
Notifications
You must be signed in to change notification settings - Fork 269
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
Feature request: protobuf file formatter. #11
Comments
Buf isn’t associated with the Prototool project and doesn’t intend to cover all of Prototool’s various use cases - we have no idea of Prototool’s intended long-term support posture. For reference, here is our reasoning on formatting: https://buf.build/docs/lint-checkers#formatting |
Going to close this issue for now - we want to keep zero open issues unless we intend to work on them, and we don’t see a formatter being a priority any time soon. It turns out that FileDescriptorSets are lossy, namely there are situations where leading detached comments are dropped during parsing. It’s not possible to make a 100% correct formatter based on FileDescriptorSets, and Buf is FileDescriptorSet-based. Prototool uses a third-party Protobuf parser for it’s formatter, which as we discuss in the documentation, leads to other issues. |
That's fine, and I totally understand the reasoning. Even a closed ticket is good. |
Just an update: we are working on this, although not high priority, but we should have something out in the future. |
https://github.com/uber/prototool has updated their readme to redirect users to buf (uber/prototool@71e91a9). Which somewhat implies the eventual death of prototool, which means the death of some features that buf is missing (intentional or not).
buf's current position on formatting proto files is that it's outside of the scope of the tool, or currently more troublesome than the value of the feature: https://buf.build/docs/lint-checkers#formatting
This is a fine position, but I think it's worth tracking an issue against this for whenever someone takes on a "correct" parsing & formatting implementation.
The text was updated successfully, but these errors were encountered: