Skip to content

Commit 4a2aa77

Browse files
Documentation update for protobuf installation (#4509)
Signed-off-by: Omid A <omid.andalib@improving.com>
1 parent 1712e00 commit 4a2aa77

File tree

4 files changed

+69
-51
lines changed

4 files changed

+69
-51
lines changed

go/DEVELOPER.md

Lines changed: 17 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -47,6 +47,9 @@ source "$HOME/.cargo/env"
4747
rustc --version
4848
```
4949

50+
> [!NOTE]
51+
> You may wish to add the entire `export PATH` line to your shell configuration file to persist this path addition, either `.bashrc` or `.zshrc` depending on which shell you are using.
52+
5053
Continue with **Install protobuf compiler** and **Install `ziglang` and `zigbuild`** below.
5154

5255
**Dependencies installation for CentOS**
@@ -66,36 +69,33 @@ source "$HOME/.cargo/env"
6669
rustc --version
6770
```
6871

72+
> [!NOTE]
73+
> You may wish to add the entire `export PATH` line to your shell configuration file to persist this path addition, either `.bashrc` or `.zshrc` depending on which shell you are using.
74+
6975
Continue with **Install protobuf compiler** and **Install `ziglang` and `zigbuild`** below.
7076

7177
**Dependencies installation for MacOS**
7278

7379
```bash
7480
brew update
75-
brew install go make git gcc pkgconfig protobuf@3 openssl cmake
81+
brew install go make git gcc pkgconfig openssl cmake
7682
export PATH="$PATH:$HOME/go/bin"
7783
curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh
7884
source "$HOME/.cargo/env"
7985
# Check that the Rust compiler is installed
8086
rustc --version
8187
```
8288

83-
**Install protobuf compiler**
89+
> [!NOTE]
90+
> You may wish to add the entire `export PATH` line to your shell configuration file to persist this path addition, either `.bashrc` or `.zshrc` depending on which shell you are using.
8491
85-
To install protobuf for MacOS, run:
86-
87-
```bash
88-
brew install protobuf@3
89-
# Verify the Protobuf compiler installation
90-
protoc --version
92+
Continue with **Install protobuf compiler** below.
93+
It is not necessary to **Install `ziglang` and `zigbuild`** for MacOS.
9194

92-
# If protoc is not found or does not work correctly, update the PATH
93-
echo 'export PATH="/opt/homebrew/opt/protobuf@3/bin:$PATH"' >> /Users/$USER/.bash_profile
94-
source /Users/$USER/.bash_profile
95-
protoc --version
96-
```
95+
**Install protobuf compiler**
9796

98-
For the remaining systems, do the following:
97+
Various platform-specific zips can be found [here](https://github.com/protocolbuffers/protobuf/releases/v3.20.3).
98+
Choose the appropriate zip for your system and run the commands below, adjusting for the zip you chose:
9999

100100
```bash
101101
PB_REL="https://github.com/protocolbuffers/protobuf/releases"
@@ -106,6 +106,9 @@ export PATH="$PATH:$HOME/.local/bin"
106106
protoc --version
107107
```
108108

109+
> [!NOTE]
110+
> You may wish to add the entire `export PATH` line to your shell configuration file to persist this path addition, either `.bashrc` or `.zshrc` depending on which shell you are using.
111+
109112
**Install `ziglang` and `zigbuild`**
110113

111114
```bash

java/DEVELOPER.md

Lines changed: 9 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ The Valkey GLIDE Java wrapper consists of both Java and Rust code. Rust bindings
1818
- GCC
1919
- pkg-config
2020
- cmake
21-
- protoc (protobuf compiler) >= 29.1
21+
- protoc (protobuf compiler) >= v29.1
2222
- openssl
2323
- openssl-dev
2424
- rustup
@@ -59,24 +59,20 @@ Continue with **Install protobuf compiler** and **Install `ziglang` and `zigbuil
5959

6060
```bash
6161
brew update
62-
brew install openjdk@11 git gcc pkgconfig protobuf openssl cmake
62+
brew install openjdk@11 git gcc pkgconfig openssl cmake
6363
curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh
6464
source "$HOME/.cargo/env"
6565
```
6666

6767
Continue with **Install protobuf compiler** below.
68+
It is not necessary to **Install `ziglang` and `zigbuild`** for MacOS.
6869

6970
**Install protobuf compiler**
7071

71-
To install protobuf for MacOS, run:
72+
Only protobuf v29.1 is supported. Other versions are not supported and may cause build issues.
7273

73-
```bash
74-
brew install protobuf
75-
# Check that the protobuf compiler version 29.1 or higher is installed
76-
protoc --version
77-
```
78-
79-
For the remaining systems, do the following:
74+
Various platform-specific zips can be found [here](https://github.com/protocolbuffers/protobuf/releases/tag/v29.1).
75+
Choose the appropriate zip for your system and run the commands below, adjusting for the zip you chose:
8076

8177
```bash
8278
PB_REL="https://github.com/protocolbuffers/protobuf/releases"
@@ -87,6 +83,9 @@ export PATH="$PATH:$HOME/.local/bin"
8783
protoc --version
8884
```
8985

86+
> [!NOTE]
87+
> You may wish to add the entire `export PATH` line to your shell configuration file to persist this path addition, either `.bashrc` or `.zshrc` depending on which shell you are using.
88+
9089
**Install `ziglang` and `zigbuild`**
9190

9291
```bash
@@ -174,7 +173,6 @@ Some troubleshooting issues:
174173
you may need to restart your machine. In particular, this may solve the following problems:
175174
- Failed to find `cargo` after `rustup`.
176175
- No Protobuf compiler (protoc) found.
177-
- If protobuf 29.0 or earlier is detected, upgrade to the latest protobuf release.
178176
179177
## Running Examples App
180178

node/DEVELOPER.md

Lines changed: 29 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ If your Nodejs version is below the supported version specified in the client's
2121
- GCC
2222
- pkg-config
2323
- cmake
24-
- protoc (protobuf compiler)
24+
- protoc (protobuf compiler) >= v3.20.0
2525
- openssl
2626
- openssl-dev
2727
- rustup
@@ -30,33 +30,57 @@ If your Nodejs version is below the supported version specified in the client's
3030

3131
```bash
3232
sudo apt update -y
33-
sudo apt install -y nodejs npm git gcc pkg-config protobuf-compiler openssl libssl-dev cmake
33+
sudo apt install -y nodejs npm git gcc pkg-config openssl libssl-dev cmake
3434
curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh
3535
source "$HOME/.cargo/env"
3636
# Check the installed node version
3737
node -v
3838
```
3939

40-
> **Note:** Ensure that you installed a supported Node.js version. For Ubuntu 22.04 or earlier, please refer to the instructions [here](#note-nodejs-supported-version) to upgrade your Node.js version.
40+
Continue with **Install protobuf compiler** below.
41+
42+
> [!NOTE]
43+
> Ensure that you installed a supported Node.js version. For Ubuntu 22.04 or earlier, please refer to the instructions [here](#note-nodejs-supported-version) to upgrade your Node.js version.
4144
4245
**Dependencies installation for CentOS**
4346

4447
```bash
4548
sudo yum update -y
46-
sudo yum install -y nodejs git gcc pkgconfig protobuf-compiler openssl openssl-devel gettext cmake
49+
sudo yum install -y nodejs git gcc pkgconfig openssl openssl-devel gettext cmake
4750
curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh
4851
source "$HOME/.cargo/env"
4952
```
5053

54+
Continue with **Install protobuf compiler** below.
55+
5156
**Dependencies installation for MacOS**
5257

5358
```bash
5459
brew update
55-
brew install nodejs git gcc pkgconfig protobuf openssl cmake
60+
brew install nodejs git gcc pkgconfig openssl cmake
5661
curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh
5762
source "$HOME/.cargo/env"
5863
```
5964

65+
Continue with **Install protobuf compiler** below.
66+
67+
**Install protobuf compiler**
68+
69+
Various platform-specific zips can be found [here](https://github.com/protocolbuffers/protobuf/releases/v3.20.3).
70+
Choose the appropriate zip for your system and run the commands below, adjusting for the zip you chose:
71+
72+
```bash
73+
PB_REL="https://github.com/protocolbuffers/protobuf/releases"
74+
curl -LO $PB_REL/download/v3.20.3/protoc-3.20.3-linux-x86_64.zip
75+
unzip protoc-3.20.3-linux-x86_64.zip -d $HOME/.local
76+
export PATH="$PATH:$HOME/.local/bin"
77+
# Check that the protobuf compiler is installed. A minimum version of 3.20.0 is required.
78+
protoc --version
79+
```
80+
81+
> [!NOTE]
82+
> You may wish to add the entire `export PATH` line to your shell configuration file to persist this path addition, either `.bashrc` or `.zshrc` depending on which shell you are using.
83+
6084
**Valkey Server and CLI**
6185
See the [Valkey installation guide](https://valkey.io/topics/installation/) to install the Valkey server and CLI.
6286

python/DEVELOPER.md

Lines changed: 14 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -122,33 +122,23 @@ Continue with **Install protobuf compiler** and **Install `ziglang` and `zigbuil
122122

123123
```bash
124124
brew update
125-
brew install python3 git gcc pkgconfig protobuf@3 openssl virtualenv cmake
125+
brew install python3 git gcc pkgconfig openssl virtualenv cmake
126126
curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh
127127
source "$HOME/.cargo/env"
128128
# Check that the Rust compiler is installed
129129
rustc --version
130130
```
131+
131132
Continue with **Install protobuf compiler** below.
133+
It is not necessary to **Install `ziglang` and `zigbuild`** for MacOS.
132134

133135
</details>
134136

135137
<details>
136138
<summary>Install protobuf compiler</summary>
137139

138-
To install protobuf for MacOS, run:
139-
140-
```bash
141-
brew install protobuf@3
142-
# Verify the Protobuf compiler installation
143-
protoc --version
144-
145-
# If protoc is not found or does not work correctly, update the PATH
146-
echo 'export PATH="/opt/homebrew/opt/protobuf@3/bin:$PATH"' >> /Users/$USER/.bash_profile
147-
source /Users/$USER/.bash_profile
148-
protoc --version
149-
```
150-
151-
For the remaining systems, do the following:
140+
Various platform-specific zips can be found [here](https://github.com/protocolbuffers/protobuf/releases/v3.20.3).
141+
Choose the appropriate zip for your system and run the commands below, adjusting for the zip you chose:
152142

153143
```bash
154144
PB_REL="https://github.com/protocolbuffers/protobuf/releases"
@@ -159,6 +149,9 @@ export PATH="$PATH:$HOME/.local/bin"
159149
protoc --version
160150
```
161151

152+
> [!NOTE]
153+
> You may wish to add the entire `export PATH` line to your shell configuration file to persist this path addition, either `.bashrc` or `.zshrc` depending on which shell you are using.
154+
162155
</details>
163156

164157
<details>
@@ -358,7 +351,7 @@ This section explains how the `valkey-glide` (async client) and `valkey-glide-sy
358351
359352
> By default, `mkdocs` should still be using Google's Python Docstring Style so the "Documentation Style" section below will still be valid.
360353

361-
We follow the [Google Style Python Docstrings format](https://sphinxcontrib-napoleon.readthedocs.io/en/latest/example_google.html) in our documentation. For our documentation tool, we use `sphinx`.
354+
We follow the [Google Style Python Docstrings format](https://sphinxcontrib-napoleon.readthedocs.io/en/latest/example_google.html) in our documentation. For our documentation tool, we use `sphinx`.
362355

363356
**Note:** `docs/index.rst` has manual modifications to it and should NOT be deleted. Modify this file with caution.
364357

@@ -424,7 +417,7 @@ Examples:
424417
"""
425418
```
426419

427-
### Example of Properly Formatted Documentation for a Class
420+
### Example of Properly Formatted Documentation for a Class
428421

429422
```python
430423
class BitOffsetMultiplier(BitFieldOffset):
@@ -495,7 +488,7 @@ Attributes:
495488

496489
#### Return value(s)
497490

498-
Return values are a little special for sphinx. If we wanted to provide more context or multiple possible return values, the convention we will go for is that we should add a space between every different return value.
491+
Return values are a little special for sphinx. If we wanted to provide more context or multiple possible return values, the convention we will go for is that we should add a space between every different return value.
499492

500493
We start by adding the return type on the first line, followed by a description of the return value.
501494

@@ -504,10 +497,10 @@ We start by adding the return type on the first line, followed by a description
504497
```python
505498
Returns:
506499
List[int]: Some description here regarding the purpose of the list of ints being
507-
returned. Notice how this new line is not indented but it is still apart of the same
500+
returned. Notice how this new line is not indented but it is still apart of the same
508501
description.
509502
510-
If we ever want to provide more context or another description of another return value
503+
If we ever want to provide more context or another description of another return value
511504
(ex. None, -1, True/False, etc.) we add a space between this description and the
512505
previous description.
513506
```
@@ -551,7 +544,7 @@ Examples:
551544
}
552545
# Indicates the stream entries for "my_stream" with IDs greater than "0-0". The operation blocks up to
553546
# 1000ms if there is no stream data.
554-
547+
555548
... # More examples here
556549
```
557550

0 commit comments

Comments
 (0)