Skip to main content
  1. Decisions/

Internalize Protobuf Codegen

·116 words·1 min
Agent IO
Author
Agent IO
Table of Contents
All protobuf support code that IO uses is generated within the project.

With 05b5e73, we committed to keeping a genproto directory in the project that is not checked in and regenerated dynamically for new repo clones and in all automated container builds.

Pros
#

  • We have more control over what is generated.
  • There is less risk of accidental breakage due to dependency drift (protos are kept in the repo).

Cons
#

  • We’re on our own.
  • We have to maintain a set of source protos for Envoy and other dependencies.
  • (This could be big) It is difficult to use third-party code that depends on the same protos that we do. There is a global (in-app) protobuf registry that fails hard if duplicate implementations are registered on startup.

Comments
#