Skip to content

Latest commit

 

History

History
51 lines (33 loc) · 1.22 KB

README.md

File metadata and controls

51 lines (33 loc) · 1.22 KB

pbsync

pbsync allows your IDE to properly resolve protobuf sources that are built with Bazel.

Currently supports most Go protos and some TypeScript protos (.d.ts definitions built with protobufjs).

Usage

Install it with go:

go install github.com/buildbuddy-io/pbsync@latest
# Then run as `pbsync`

Or install it as a bb plugin:

bb install --user buildbuddy-io/pbsync

You can get a nice development workflow by combining this plugin with the --watch flag, which will build and copy protos immediately after you edit them.

Pre-requisites

  • go 1.19 or higher
  • make

What it does

When you run pbsync:

  • It looks for all .proto files in your repo, using git ls-files for speed.

  • For each proto, it looks for BUILD rules that depend on the proto.

  • For supported language-specific rules, it looks for the file in the bazel generated source tree, and copies it to the workspace.

NOTE: pbsync does NOT build anything for you (yet). It just copies protos that are already built.

Thanks