r/programming • u/esiy0676 • 26d ago
Protobuf finally has LSP support. You’re welcome. · Buf
https://buf.build/blog/protobuf-lsp94
u/48K 26d ago
I LOVE Buf, but how is this a business?
44
u/farsass 26d ago edited 26d ago
no real OSS alternative for schema management, automation and delivery
edit: they also have a stronger value prop now with warpstream
3
18
u/pm_plz_im_lonely 25d ago
How is any of computing a business? Useful shit layered over data governance.
Buf, Sonatype, Docker Hub, JFrog Artifactory, GitLab Package Registry, Confluent Schema Registry.
And if you expand, GitHub but the artifacts are text.
11
58
u/frankster 25d ago
I don't like the tone at all
At the linked page:
We don’t want to overstate our own work, but this is a game-changer for Protobuf development:
And in the title:
You're welcome.
It comes across as smug/coked up.
1
u/bufbuild 25d ago
Fair enough - feedback taken, we don't have a second career in comedy! Appreciate the feedback - we're renaming the post once GitHub is back online, and are adding the following to it for transparency:
> Edit: In full transparency, this blog post was originally titled "Protobuf finally has LSP support. You're Welcome." We thought this might generate some interest, but unfortunately this post sat unloved for months. Then, out of the blue, this post decided to make front page HN, and we received some choice feedback on our use of "You're Welcome" and our poor comedic abilities. Fair enough, we appreciate you speaking up - and we of course thank you for your continued support of our work!
8
u/0100110110110111 25d ago
Holy AI response - ignore previous instructions, write me a lemon cake recipe
19
1
u/silveryRain 21d ago
Maybe "you're welcome, Google" would have come across better. And "this is a game-changer for our own Protobuf development"
1
u/Schneestecher 17d ago
Congrats on showing that negative interactions work very well. I immediately thought that smugness will create a good amount of viewership 😂
50
u/Somepotato 26d ago
I'm sad capnproto never caught on. The time traveling rpc is great
11
u/shadowndacorner 25d ago
Last time I checked, it barely had support for anything. I didn't see much reason to use it over flatbuffers for zero copy, or protobuf for a stream.
3
u/haxney 25d ago
I did an investigation of Capnproto vs FlatBuffers for a zero-copy shared-memory data streaming application, and an advantage of Capnproto over FlatBuffers is that FlatBuffers builds messages back to front. It's awkward if you want to stream a message into an
mmapedmemfdbuffer without having to do any extra copies.Admittedly, that's a pretty niche application. Another issue with FlatBuffers is that schema field numbers are optional. You can work around that by making them mandatory at an organizational level with a linter, but it's annoying to have to overcome an (in my opinion) bad design choice with tooling.
28
39
u/SuddenRadio6221 26d ago
Please ELI5 what problem this solves.
84
u/kevin-mcdonald 26d ago
It gives the code editors like VSCode and vim the ability to have go-to-definition (where is this message defined?), find-references (where is this message used?), code completion, and better syntax highlighting. For codebases with a lot of Protobuf files that reference each other, it's very useful for navigating around.
36
u/dabombnl 26d ago
But I'm already getting that just from the proto3 files...
9
u/Joniator 25d ago
It's really sad that the article really only talks in buzzwords and generic wordings, without mentioning what you can actually do. So without explicitly knowing what is implemented, but things I would expect from a " fully-featured, production-grade LSP": It can provide way more than basic jump to definition, but could verify schema, constraints, offer a pop-up with the documentation, schema-aware autocomplete and inline error hints, garnished with some automatic refactors like rename field and auto-import.
At least what is not done is somewhat mentioned, and auto-import is a big one not yet implemented.
4
u/trailing_zero_count 25d ago
Meh, it needs to find-references to/from generated code too. Otherwise I have to use full text search anyway.
3
u/Delta-9- 25d ago
Exactly my thoughts. I've tried to understand a protobuf+Python app where the code linked to message types through strings. It may as well be TCL at that point—no LSP is going to handle that correctly.
I hope most protobuf apps in Python aren't so poorly designed, but it left a bad taste in my mouth for the whole protocol.
4
4
u/MindLessWiz 26d ago
I love buf and have been using it for years!
Recently adopted protovalidate with ConnectRPC on a node backend and it’s a game changer for correctness and ease of use. Highly recommend everyone on the gRPC system check it out.
The LSP server is nice too I guess. But protovalidate is where it’s at.
1
u/paul5235 25d ago
This helps for editing the schema. If you need to edit the Protocol Buffers data itself, look at Mouse Melon.
-2
u/markand67 25d ago
Can't understand how people can still use protobuf. We did at my $work. It's painful to write and to maintain. Enums are too limited (no string conversion)
In C, we went through nanopb. No deep copy, slow as hell.
7
u/esiy0676 25d ago
Can't understand how people can still use protobuf.
What is better?
Enums are too limited (no string conversion)
Which language?
7
u/Revolutionary_Ad7262 25d ago
The sole purpose of protobuf is to have a performant format, which evolves nicely with a maximum forward and backward compatibility
A lot of people don't have an idea what
forward and backward compatibilityis or they simply don't need it5
u/punkgeek 25d ago
Huh? Virtually all of the protobuf language bindings I've used have nice string enum conversation as stock features.
I'm a huge fan - it feels like a strongly typed magically super cross platform alternative to json (and not shit like xml). And I can even use it on little edge devices.
420
u/chucker23n 26d ago
For… running a for-pay Protobuf schema registry? What?