Errata

gRPC: Up and Running

Errata for gRPC: Up and Running

Submit your own errata for this product.

The errata list is a list of errors and their corrections that were found after the product was released.

The following errata were submitted by our customers and have not yet been approved or disproved by the author or editor. They solely represent the opinion of the customer.

Color Key: Serious technical mistake Minor technical mistake Language or formatting error Typo Question Note Update

Version Location Description Submitted by Date submitted
x

Hi,

Can you please modify the source code for the book (gRPC Up and Running by Kasun Indrasiri and Danesh Kuruppu) to have on the root build.gradle:

allprojects {
apply plugin: 'idea'
apply plugin: 'java'

repositories {
mavenCentral()
}

dependencies {
implementation 'javax.annotation:javax.annotation-api:1.3.2'
}
}

The problem is that the gRPC generated code uses javax.annotation.Generated, and starting from Java 9 it became javax.annoation.processing.Generated, so out of the box the project doesn't build, and I actually spent quite a bit of time to understand the root cause of the problem, so modifying the code to what I mentioned above will probably save other fellow O'Reilly developers some time.

Thanks,
Ahmed Nabih

Anonymous  Aug 24, 2020 
Other Digital Version Example 2-5
message Product

On the field definitions, price is not defined, but latter on the clients price is one of the field set (on the example code in github price is defined on the proto file)

Adrian Gonzalez  Jul 19, 2023 
Chapter 2, section : Defining Messages
Example code snippets

Code snippets from example 2-1 and 2-2 should have been interchanged.

Ashish Karhade  Jul 27, 2023 
O'Reilly learning platform Page Ch2, Generating client/server stubs
Irvine

The instructions for processing the .proto file are:
protoc -I ecommerce \
ecommerce/product_info.proto \
--go_out=plugins=grpc:<module_dir_path>/ecommerce

This part seems to be an error: <module_dir_path>

Ken Hommel  Apr 24, 2024 
O'Reilly learning platform Page Ch2, Generating client/server stubs
Instructions for installing protoc Golang plug-in

The given instructions for fetching the Go protoc plug-in are deprecated:
% go get -u github.com/golang/protobuf/protoc-gen-go
go: module github.com/golang/protobuf is deprecated: Use the "google.golang.org/protobuf" module instead.

Ken Hommel  Apr 24, 2024 
O'Reilly learning platform Page Ch2, Generating client/server stubs
protoc command line, 18% into the chapter

The given command does not work. Besides the typo (reported previously), running the given "protoc" command produced various errors. With "--go_out=plugins=ecommerce", the error is:

protoc-gen-go: unable to determine Go import path for "product_info.proto"

Please specify either:
• a "go_package" option in the .proto source file, or
• a "M" argument on the command line.
...
--go_out: protoc-gen-go: Plugin failed with status code 1.

For that, I added this to the .proto file:

option go_package = "./";

Then I got:

--go_out: protoc-gen-go: plugins are not supported; use 'protoc --go-grpc_out=...' to generate gRPC

So I changed the last line of the command to:
--go_out=ecommerce/

That worked.

Ken Hommel  Apr 24, 2024 
Printed Page 1
2

URL "https://oleil.ly/q6N1P" does not work.
It may be wrong URL.

Anonymous  Mar 20, 2022