Back to all reviewers

Protocol buffer organization

temporalio/temporal
Based on 2 comments
Other

When defining protocol buffer messages, prioritize good organization and reuse: 1. Reuse existing message types instead of duplicating structures. This reduces maintenance effort and prevents potential bugs from diverging implementations.

Code Style Other

Reviewer Prompt

When defining protocol buffer messages, prioritize good organization and reuse:

  1. Reuse existing message types instead of duplicating structures. This reduces maintenance effort and prevents potential bugs from diverging implementations.

  2. Group related fields together and maintain consistent field ordering throughout your protocol definitions. When fields are conceptually related (like pass and id), they should always appear together and in the same order.

Example:

// GOOD: Reusing existing message types
message TaskQueueUserData {
  api.temporal.server.v1.RateLimit rate_limit = 1;
}

// GOOD: Related fields grouped together in consistent order
message GetTaskQueueTasksRequest {
  int64 min_pass = 5;  // Related fields grouped together
  int64 min_task_id = 6;
  // Other fields...
}
2
Comments Analyzed
Other
Primary Language
Code Style
Category

Source Discussions