Support proto2 syntax and custom proto file headers - #1305
Merged
Conversation
jwils
requested review from
BrianSigafoos-SQ,
bsorbo,
ellisandrews-toast,
jwondrusch,
marcdaniels-toast,
myronmarston and
rossroberts-toast
as code owners
July 8, 2026 23:21
jwils
force-pushed
the
joshuaw/proto-syntax-headers
branch
2 times, most recently
from
July 9, 2026 16:00
9b72525 to
3396a37
Compare
jwils
changed the base branch from
joshuaw/proto-field-numbers
to
joshuaw/proto-timestamp
July 9, 2026 16:00
jwils
force-pushed
the
joshuaw/proto-syntax-headers
branch
from
July 9, 2026 17:29
3396a37 to
98fac03
Compare
jwils
force-pushed
the
joshuaw/proto-syntax-headers
branch
from
July 9, 2026 18:13
98fac03 to
b3029f8
Compare
jwils
force-pushed
the
joshuaw/proto-syntax-headers
branch
from
July 10, 2026 15:44
b3029f8 to
d837b3a
Compare
jwils
force-pushed
the
joshuaw/proto-syntax-headers
branch
from
July 10, 2026 15:52
d837b3a to
6f1b1b1
Compare
jwils
force-pushed
the
joshuaw/proto-syntax-headers
branch
from
July 11, 2026 13:38
6f1b1b1 to
d4471ca
Compare
jwils
force-pushed
the
joshuaw/proto-syntax-headers
branch
from
July 11, 2026 13:54
d4471ca to
5eb990f
Compare
jwils
force-pushed
the
joshuaw/proto-syntax-headers
branch
2 times, most recently
from
July 11, 2026 14:14
d40ff2e to
40be848
Compare
jwils
force-pushed
the
joshuaw/proto-syntax-headers
branch
from
July 15, 2026 23:52
7b9a2b7 to
c8b5e5e
Compare
jwils
force-pushed
the
joshuaw/proto-syntax-headers
branch
from
July 31, 2026 13:31
0f21d16 to
abf4228
Compare
jwils
force-pushed
the
joshuaw/proto-syntax-headers
branch
from
August 3, 2026 15:52
abf4228 to
dedef1c
Compare
jwils
force-pushed
the
joshuaw/proto-syntax-headers
branch
from
August 3, 2026 15:57
dedef1c to
a308ae9
Compare
jwils
force-pushed
the
joshuaw/proto-syntax-headers
branch
from
August 6, 2026 15:54
a308ae9 to
3fb6c6c
Compare
jwils
force-pushed
the
joshuaw/proto-syntax-headers
branch
from
August 7, 2026 16:20
3fb6c6c to
138589f
Compare
jwils
force-pushed
the
joshuaw/proto-syntax-headers
branch
from
August 8, 2026 17:44
138589f to
cf44426
Compare
jwils
force-pushed
the
joshuaw/proto-syntax-headers
branch
from
August 8, 2026 17:59
cf44426 to
b202b68
Compare
jwils
force-pushed
the
joshuaw/proto-syntax-headers
branch
from
August 8, 2026 18:57
b202b68 to
29a1a50
Compare
jwils
force-pushed
the
joshuaw/proto-syntax-headers
branch
2 times, most recently
from
August 16, 2026 01:56
109b80d to
a85103d
Compare
myronmarston
approved these changes
Aug 18, 2026
myronmarston
left a comment
Collaborator
There was a problem hiding this comment.
LGTM with a couple non-blocking suggestions.
jwils
force-pushed
the
joshuaw/proto-syntax-headers
branch
from
August 18, 2026 14:49
a85103d to
4605421
Compare
`proto_schema_artifacts` gains two options: - `syntax: :proto2` emits a proto2 file instead of the default proto3 (labeling every field `optional` or `repeated`). This is useful when the generated messages need to reference proto2 types — `protoc` forbids a proto3 message from referencing a proto2 enum. - `header_lines:` injects file-level lines (such as `option` declarations) verbatim as a contiguous section after the `package` declaration, so language-specific options can be set without baking any particular convention into the gem.
jwils
force-pushed
the
joshuaw/proto-syntax-headers
branch
from
August 19, 2026 02:17
4605421 to
6805286
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Why
Some consumers need the generated messages to reference proto2 types —
protocforbids a proto3 message from referencing a proto2 enum — and language-specific file options (likejava_package) shouldn't require baking any convention into the gem.What
proto_schema_artifactsgains two options:syntax: :proto2emits a proto2 file instead of the default proto3, labeling every fieldoptionalorrepeatedheaders:injects file-level lines (such asoptiondeclarations) verbatim as a contiguous section after thepackagedeclarationRisk Assessment
Low — only affects the unreleased
elasticgraph-proto_ingestionextension; both options are opt-in.References
Update — 2026-07-10
This PR is stacked directly on #1306 (→ #1304 → #1080).