Skip to content

Commit e1b669d

Browse files
committed
Add note about PROTOC_PATH
1 parent 3dc41a0 commit e1b669d

File tree

2 files changed

+15
-5
lines changed

2 files changed

+15
-5
lines changed

Sources/GRPCCore/Documentation.docc/Tutorials/Hello-World/Hello-World.tutorial

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,11 +29,16 @@
2929
Let's start by running the existing Greeter application.
3030

3131
As a prerequisite you must have the Protocol Buffers compiler (`protoc`) installed. You can
32-
find the instructions for doing this in the [gRPC Swift Protobuf
32+
find the instructions for doing this in the [gRPC Swift Protobuf
3333
documentation](https://swiftpackageindex.com/grpc/grpc-swift-protobuf/documentation/grpcprotobuf/installing-protoc).
3434
The remainder of this tutorial assumes you installed `protoc` and it's available in
3535
your `$PATH`.
3636

37+
You may notices that the `swift` commands are all prefixed with `PROTOC_PATH=$(which protoc)`,
38+
this is to let the build system know where `protoc` is located so that it can generate stubs
39+
for you. You can read more about it in the [gRPC Swift Protobuf
40+
documentation](https://swiftpackageindex.com/grpc/grpc-swift-protobuf/documentation/grpcprotobuf/generating-stubs).
41+
3742
@Steps {
3843
@Step {
3944
In a terminal run `PROTOC_PATH=$(which protoc) swift run hello-world serve` to start the

Sources/GRPCCore/Documentation.docc/Tutorials/Route-Guide/Route-Guide.tutorial

Lines changed: 9 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -21,11 +21,16 @@
2121
to depend on gRPC Swift.
2222

2323
As a prerequisite you must have the Protocol Buffers compiler (`protoc`) installed. You can
24-
find the instructions for doing this in the [gRPC Swift Protobuf
24+
find the instructions for doing this in the [gRPC Swift Protobuf
2525
documentation](https://swiftpackageindex.com/grpc/grpc-swift-protobuf/documentation/grpcprotobuf/installing-protoc).
2626
The remainder of this tutorial assumes you installed `protoc` and it's available in
2727
your `$PATH`.
2828

29+
You may notices that the `swift` commands are all prefixed with `PROTOC_PATH=$(which protoc)`,
30+
this is to let the build system know where `protoc` is located so that it can generate stubs
31+
for you. You can read more about it in the [gRPC Swift Protobuf
32+
documentation](https://swiftpackageindex.com/grpc/grpc-swift-protobuf/documentation/grpcprotobuf/generating-stubs).
33+
2934
@Steps {
3035
@Step {
3136
Create a new directory called for the package called `RouteGuide`.
@@ -126,7 +131,7 @@
126131
called `route_guide.proto`. We'll use the "proto3" syntax and our service will be part of
127132
the "routeguide" package.
128133

129-
It's good practice to organise your `.proto` files according to the package they are
134+
It's good practice to organize your `.proto` files according to the package they are
130135
declared in, that's why we created the `routeguide` directory to match the "routeguide"
131136
package name.
132137

@@ -475,13 +480,13 @@
475480

476481
@Steps {
477482
@Step {
478-
In one terminal run `swift run RouteGuide --server` to start the server.
483+
In one terminal run `PROTOC_PATH=$(which protoc) swift run RouteGuide --server` to start the server.
479484

480485
@Code(name: "Console", file: "route-guide-sec07-step01-server.txt")
481486
}
482487

483488
@Step {
484-
In another terminal run `swift run RouteGuide` to run the client program.
489+
In another terminal run `PROTOC_PATH=$(which protoc) swift run RouteGuide` to run the client program.
485490

486491
@Code(name: "Console", file: "route-guide-sec07-step02-client.txt")
487492
}

0 commit comments

Comments
 (0)