Skip to content

Commit 98e653a

Browse files
authored
Merge pull request #124 from mhoeger/protoUpdate
Consume service name changes from protobuf repo
2 parents 171ff8c + 87bd102 commit 98e653a

File tree

2 files changed

+13
-5
lines changed

2 files changed

+13
-5
lines changed

src/main/azure-functions-language-worker-protobuf/README.md

+12-3
Original file line numberDiff line numberDiff line change
@@ -52,10 +52,19 @@ set OUTDIR=%MSGDIR%\DotNet
5252
mkdir %OUTDIR%
5353
%GRPC_TOOLS_PATH%\protoc.exe %PROTO% --csharp_out %OUTDIR% --grpc_out=%OUTDIR% --plugin=protoc-gen-grpc=%GRPC_TOOLS_PATH%\grpc_csharp_plugin.exe --proto_path=%PROTO_PATH% --proto_path=%PROTOBUF_TOOLS%
5454
```
55-
## Java
56-
--TODO--
57-
5855
## JavaScript
56+
In package.json, add to the build script the following commands to build .js files and to build .ts files. Use and install npm package `protobufjs`.
57+
58+
Generate JavaScript files:
59+
```
60+
pbjs -t json-module -w commonjs -o azure-functions-language-worker-protobuf/src/rpc.js azure-functions-language-worker-protobuf/src/proto/FunctionRpc.proto
61+
```
62+
Generate TypeScript files:
63+
```
64+
pbjs -t static-module azure-functions-language-worker-protobuf/src/proto/FunctionRpc.proto -o azure-functions-language-worker-protobuf/src/rpc_static.js && pbts -o azure-functions-language-worker-protobuf/src/rpc.d.ts azure-functions-language-worker-protobuf/src/rpc_static.js
65+
```
66+
67+
## Java
5968
Maven plugin : [protobuf-maven-plugin](https://www.xolstice.org/protobuf-maven-plugin/)
6069
In pom.xml add following under configuration for this plugin
6170
<protoSourceRoot>${basedir}/<path to this repo>/azure-functions-language-worker-protobuf/src/proto</protoSourceRoot>

src/main/azure-functions-language-worker-protobuf/src/proto/FunctionRpc.proto

+1-2
Original file line numberDiff line numberDiff line change
@@ -4,10 +4,9 @@ syntax = "proto3";
44
option java_multiple_files = true;
55
option java_package = "com.microsoft.azure.functions.rpc.messages";
66
option java_outer_classname = "FunctionProto";
7-
option objc_class_prefix = "FunctionRpc";
87
option csharp_namespace = "Microsoft.Azure.WebJobs.Script.Grpc.Messages";
98

10-
package FunctionRpc;
9+
package AzureFunctionsRpcMessages;
1110

1211
import "google/protobuf/duration.proto";
1312

0 commit comments

Comments
 (0)