Skip to content

Allow specifying the protoc path in protogen - #323

Merged
stephanos merged 2 commits into
mainfrom
stephanos/protogen-protoc-path
Oct 30, 2026
Merged

stephanos merged 2 commits into
mainfrom
stephanos/protogen-protoc-path

Conversation

@stephanos

@stephanos stephanos commented Oct 30, 2026 •

Copy link
Copy Markdown
Contributor

What changed?

Add --protoc-path to protogen, defaulting to protoc.

Why?

Let callers pass a pinned protoc executable without modifying PATH.

@CLAassistant

CLAassistant commented Oct 30, 2026 •

Copy link
Copy Markdown

CLA assistant check
All committers have signed the CLA.

@stephanos
stephanos marked this pull request as ready for review October 30, 2026 18:42
@stephanos
stephanos requested review from a team as code owners October 30, 2026 18:42
@stephanos
stephanos requested a review from chrsmith October 30, 2026 19:00

@chrsmith chrsmith left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

I think this is good enough as-is. But my understanding is that when dealing with $PATH and "security issues", there's all sorts of weird edge cases to consider.

MAAAAAAyyyyybee we want to say "fully-qualified path to protoc"? Maaaaayyyybbeee we want to add a check that the file actually exists? (And if not, fail? And have if protocoPathFlag == "" { protocoPathFlag = lookupFromPATH() }?

But as far as this change is concerned, in the context of:

  • It just works like before, using PATH
  • Allows you to specify a fully-qualified path to pin a specific version

This checks all the boxes :shipit:

@stephanos
stephanos merged commit 01272cb into main Oct 30, 2026
4 checks passed
@stephanos
stephanos deleted the stephanos/protogen-protoc-path branch October 30, 2026 19:51
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.

3 participants