Skip to content

Conversation

tscolari
Copy link

Description

This is a poc of how to use buf to generate the proto files from the remote repo.
It's similar to the experimentation from the go-sdk.

In a nutshell:

  1. Using buf, the protos for generation are referenced remotely from dapr/dapr - so not copied locally anymore
  2. There's a manual "lock file" that ensures that the generation is happening against a committed remote sha (this could be replaced by buf's own locking mechanism if dapr/dapr supports it).
  3. Ideally CI would ensure that the generated files are up to date and unmodified.

JS is not a language I'm familiar with, but I tried to keep the generation using the same pattern (ts/es), but different outputs can be configured by using/combining different plugins in buf.gen.yaml.

This is not currently generating proto dependencies like google timestamppb for example - I think there's probably a way to generate them, but at the same time I think they can be consumed versioned from https://www.npmjs.com/package/google-protobuf

Issue reference

We strive to have all PR being opened based on an issue, where the problem or feature have been discussed prior to implementation.

Please reference the issue this PR will close: #[issue number]

Checklist

Please make sure you've completed the relevant tasks for this PR, out of the following list:

  • Code compiles correctly
  • Created/updated tests
  • Extended the documentation

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant