Skip to content

Conversation

ConstantinChirila
Copy link

Description

Problem:

Running scripts/fetch-proto.sh failed with: --js_out: protoc-gen-js: program not found or is not executable
On modern protoc versions, the builtin JS generator is no longer available the same way, so --js_out tries to invoke an external protoc-gen-js that isn’t in PATH.

This is due protoc v28 no longer providing the legacy/bundled JS generator, so --js_out requires a plugin discovery step that fails in current environment. grpc-tools ships a protoc binary and plugins known to work with Node’s JS/TS generation this Eliminates PATH/plugin discovery issues.

The change:

  • Prefer node_modules/.bin/grpc_tools_node_protoc for generation; fall back to protoc if unavailable.
  • Keep explicit plugin paths for TS and gRPC: --plugin=protoc-gen-ts=.../protoc-gen-ts and --plugin=protoc-gen-grpc=.../grpc_tools_node_protoc_plugin

Issue reference

No issue reference. Needed to unblock further work.

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

@ConstantinChirila ConstantinChirila requested review from a team as code owners August 19, 2025 08:19
@ConstantinChirila
Copy link
Author

@WhitWaldo when you got the time to have a look at this.

Copy link

codecov bot commented Aug 19, 2025

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 100.00%. Comparing base (d1bf38a) to head (2a726f3).
⚠️ Report is 32 commits behind head on main.

Additional details and impacted files
@@            Coverage Diff            @@
##              main      #714   +/-   ##
=========================================
  Coverage   100.00%   100.00%           
=========================================
  Files            1         1           
  Lines            6         6           
  Branches         1         1           
=========================================
  Hits             6         6           

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

Copy link
Contributor

@WhitWaldo WhitWaldo left a comment

Choose a reason for hiding this comment

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

Left some notes about some protos to remove down the road, but it sounds from the comments that there are inappropriate imports coming from them.

Generally, only appcallback.proto, dapr.proto and common.proto should be referenced by the SDK. All the others are protos specific to the Dapr runtime internally and subject to change at any point. They should not be relied upon for type support.

@@ -131,6 +136,8 @@ downloadFile "https://raw.githubusercontent.com/$ORG_NAME/$REPO_NAME/$BRANCH_NAM
downloadFile "https://raw.githubusercontent.com/$ORG_NAME/$REPO_NAME/$BRANCH_NAME/dapr/proto/internals/v1/apiversion.proto" "$PATH_ROOT/src/proto/dapr/proto/internals/v1/apiversion.proto"
Copy link
Contributor

Choose a reason for hiding this comment

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

We can remove all of these except those actually used by the SDK:
dapr.proto
common.proto
appcallback.proto

@@ -147,6 +154,8 @@ echo ""
echo "Compiling gRPC files"
generateGrpc "$PATH_ROOT/src/proto" "dapr/proto/common/v1/common.proto"
generateGrpc "$PATH_ROOT/src/proto" "dapr/proto/internals/v1/apiversion.proto"
# Also generate code for reminders to satisfy imports
generateGrpc "$PATH_ROOT/src/proto" "dapr/proto/internals/v1/reminders.proto"
generateGrpc "$PATH_ROOT/src/proto" "dapr/proto/internals/v1/service_invocation.proto"
Copy link
Contributor

Choose a reason for hiding this comment

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

Same here - we shouldn't actually be using any of these except appcallback.proto, dapr.proto and common.proto as they're internal to the runtime and subject to change at any point.

@WhitWaldo
Copy link
Contributor

This looks great @ConstantinChirila - ping me when you've got the tests passing and I can merge this and your other PR and get an RC out the door for this SDK.

@WhitWaldo WhitWaldo added the area/client General client-related issues not-specific to another building block label Aug 19, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area/client General client-related issues not-specific to another building block
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants