Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Explicitly use protoc installed in the makefile. #16005

Merged
merged 4 commits into from
Jan 21, 2025

Conversation

pavel-raykov
Copy link
Collaborator

@pavel-raykov pavel-raykov commented Jan 21, 2025

Before this change we interact with protoc as follows:

  1. install protoc at the specific version 25.1 in core/scripts/install-protoc.sh.
  2. enable protoc by updating $PATH variable in core/scripts/install-protoc.sh
  3. call gomods -w go generate -x ./... and rely on //go:generate protoc ... directives to generate pb definitions.

The 2. Step above actually only works !inside! the script, hence not updating the $PATH for the later //go:generate protoc... invocation. This works on linux because protoc is installed in .local folder which is included in $PATH by default (https://unix.stackexchange.com/questions/316765/which-distributions-have-home-local-bin-in-path). But this does not work on MAC. This PR explicitly adds installed protoc folder to $PATH so that it is used in //go:generate protoc... calls. (On MAC the make generate command will use any protoc installed, e.g., /opt/homebrew/bin/protoc.)

@pavel-raykov pavel-raykov marked this pull request as ready for review January 21, 2025 14:22
@pavel-raykov pavel-raykov requested review from a team as code owners January 21, 2025 14:22
@pavel-raykov pavel-raykov requested review from krehermann, samsondav and jmank88 and removed request for krehermann January 21, 2025 14:22
@cl-sonarqube-production
Copy link

Quality Gate passed Quality Gate passed

Issues
0 New issues
0 Fixed issues
0 Accepted issues

Measures
0 Security Hotspots
No data about Coverage
No data about Duplication

See analysis details on SonarQube

@pavel-raykov pavel-raykov added this pull request to the merge queue Jan 21, 2025
Merged via the queue into develop with commit eea54da Jan 21, 2025
102 checks passed
@pavel-raykov pavel-raykov deleted the fix-protoc-version branch January 21, 2025 14:58
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.

4 participants