Skip to content
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -29,11 +29,16 @@
Let's start by running the existing Greeter application.

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

You may notices that the `swift` commands are all prefixed with `PROTOC_PATH=$(which protoc)`,
this is to let the build system know where `protoc` is located so that it can generate stubs
for you. You can read more about it in the [gRPC Swift Protobuf
documentation](https://swiftpackageindex.com/grpc/grpc-swift-protobuf/documentation/grpcprotobuf/generating-stubs).
Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Note that this is a pre-emptive change: I think we should move the generating stubs doc to the protobuf package and then link to it from the core package docs.


@Steps {
@Step {
In a terminal run `PROTOC_PATH=$(which protoc) swift run hello-world serve` to start the
Copy link
Collaborator

Choose a reason for hiding this comment

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

Should we explain why PROTOC_PATH is needed and/or link to the plugin docs that explain it in more detail?

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Yeah that's a great point, I'll do that.

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -21,11 +21,16 @@
to depend on gRPC Swift.

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

You may notices that the `swift` commands are all prefixed with `PROTOC_PATH=$(which protoc)`,
this is to let the build system know where `protoc` is located so that it can generate stubs
for you. You can read more about it in the [gRPC Swift Protobuf
documentation](https://swiftpackageindex.com/grpc/grpc-swift-protobuf/documentation/grpcprotobuf/generating-stubs).

@Steps {
@Step {
Create a new directory called for the package called `RouteGuide`.
Expand Down Expand Up @@ -126,7 +131,7 @@
called `route_guide.proto`. We'll use the "proto3" syntax and our service will be part of
the "routeguide" package.

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

Expand Down Expand Up @@ -475,13 +480,13 @@

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

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

@Step {
In another terminal run `swift run RouteGuide` to run the client program.
In another terminal run `PROTOC_PATH=$(which protoc) swift run RouteGuide` to run the client program.

@Code(name: "Console", file: "route-guide-sec07-step02-client.txt")
}
Expand Down
Loading