comments (10)

  • > Protobuf now has modern IDE support for the first time

    Weird post. I built IntelliJ protobuf support [1] while at Google like 10 years ago, and it started shipping by default with IntelliJ in ~2021. Maybe that's not considered "modern".

    [1] https://github.com/jvolkman/intellij-protobuf-editor

    jvolkman

  • What an oddly arrogant post, there's been a Protobuf LSP available for years: https://github.com/lasorda/protobuf-language-server

    alecthomas

  • "You're welcome" is absolutely hilarious to read from a company post.

    lacoolj

  • I looked at the dependencies and noticed that it wasn’t using an existing Protobuf parser which means they reimplemented the parser from scratch. Perhaps due to a lack of error recovery in the existing implementations? I don’t have the energy right now for further inspection.

    It is definitely best to reuse the parser for the runtime when implementing an LSP but to do so properly means implementing the parser itself as a standalone library. Even better is shipping the semantic analysis as well!

    Implementation drift is definitely an issue.

    But great project anyways, just wanted to put my thoughts on the matter into the conversation!

    williamcotton

  • Lots of naysayers here, but an advantage of protobuf is that proto files are hand-writeable, and therefore having an LSP for that could be useful.

    That said, proto itself dissuades or forbids the kind of common things you might do with a LSP, such as renaming.

    Renaming fields is a big no-no [edit: this isn't true, see corrections below], as is doing things like re-ordering fields.

    A core idea of proto is that versions are strictly compatible with with previous versions. This itself has limitations and challenges for migrations, but encourages good practice about compatibility that usually gets ignored or hand-waved away in most ecosystems.

    I accept however that it's often easy to offload both the re-structuring and the checking of version compatibility to an LLM and let them go at it.

    eterm

  • While not a direct competitor to protobufs, if you are working in the video game space where struct versioning is not needed, there is an alternative language called "schema" that supports C, C++, C#, Golang, Rust and JavaScript.

    https://github.com/mas-bandwidth/schema

    gafferongames

  • "You're welcome." is such a smug verbal tic.

    gjvc

  • buf also has an interesting dynamic protobuf parser that's a drop-in for dynamicpb https://github.com/bufbuild/hyperpb-go

    loicalleyne

  • Protobuf getting LSP support before Codex implements LSPs is wild.

    nullbio

  • Buf does great work at fixing Protobuf to the point of being just barely usable. A godsend if you're stuck with Protobuf/gRPC on a legacy project.

    PufPufPuf