Skip to content

Commit 6045adf

Browse files
Merge pull request #101 from stefanvanburen/svanburen/buf-v2
Bump buf config files to v2
2 parents 1529a45 + b0db361 commit 6045adf

14 files changed

Lines changed: 67 additions & 76 deletions

File tree

README.md

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -41,23 +41,23 @@ generation is not possible, as the manifest template is not made available to a
4141
remote plugin.
4242

4343
```yaml
44-
version: v1
44+
version: v2
4545
plugins:
46-
- plugin: buf.build/community/neoeinstein-prost:v0.2.3
46+
- remote: buf.build/community/neoeinstein-prost:v0.4.0
4747
out: gen/src
4848
opt:
4949
- bytes=.
5050
- compile_well_known_types
5151
- extern_path=.google.protobuf=::pbjson_types
5252
- file_descriptor_set
53-
- plugin: buf.build/community/neoeinstein-prost-serde:v0.2.3
53+
- remote: buf.build/community/neoeinstein-prost-serde:v0.3.1
5454
out: gen/src
55-
- plugin: buf.build/community/neoeinstein-tonic:v0.3.0
55+
- remote: buf.build/community/neoeinstein-tonic:v0.4.1
5656
out: gen/src
5757
opt:
5858
- compile_well_known_types
5959
- extern_path=.google.protobuf=::pbjson_types
60-
- plugin: prost-crate
60+
- local: protoc-gen-prost-crate
6161
out: gen
6262
strategy: all
6363
opt:
Lines changed: 7 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
1-
version: v1
1+
version: v2
22
plugins:
3-
- plugin: prost
3+
- local: protoc-gen-prost
44
#path: ../../target/debug/protoc-gen-prost
55
out: src/gen
66
opt:
@@ -9,19 +9,21 @@ plugins:
99
- extern_path=.google.protobuf=::pbjson_types
1010
- file_descriptor_set
1111
- enable_type_names
12-
- plugin: prost-serde
12+
- local: protoc-gen-prost-serde
1313
#path: ../../target/debug/protoc-gen-prost-serde
1414
out: src/gen
15-
- plugin: tonic
15+
- local: protoc-gen-tonic
1616
#path: ../../target/debug/protoc-gen-tonic
1717
out: src/gen
1818
opt:
1919
- compile_well_known_types
2020
- extern_path=.google.protobuf=::pbjson_types
21-
- plugin: prost-crate
21+
- local: protoc-gen-prost-crate
2222
#path: ../../target/debug/protoc-gen-prost-crate
2323
out: .
2424
strategy: all
2525
opt:
2626
- include_file=src/gen/mod.rs
2727
- gen_crate
28+
inputs:
29+
- directory: proto

example/build-with-buf/buf.work.yaml

Lines changed: 0 additions & 3 deletions
This file was deleted.

example/build-with-buf/proto/buf.yaml

Lines changed: 0 additions & 1 deletion
This file was deleted.

proto/buf.gen.yaml

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,23 +1,23 @@
1-
version: v1
1+
version: v2
22
plugins:
3-
- plugin: prost
3+
- local: protoc-gen-prost
44
#path: ../target/debug/protoc-gen-prost
55
out: gen/src
66
opt:
77
- bytes=.
88
- compile_well_known_types
99
- extern_path=.google.protobuf=::pbjson_types
1010
- file_descriptor_set
11-
- plugin: prost-serde
11+
- local: protoc-gen-prost-serde
1212
#path: ../target/debug/protoc-gen-prost-serde
1313
out: gen/src
14-
- plugin: tonic
14+
- local: protoc-gen-tonic
1515
#path: ../target/debug/protoc-gen-tonic
1616
out: gen/src
1717
opt:
1818
- compile_well_known_types
1919
- extern_path=.google.protobuf=::pbjson_types
20-
- plugin: prost-crate
20+
- local: protoc-gen-prost-crate
2121
#path: ../target/debug/protoc-gen-prost-crate
2222
out: gen
2323
strategy: all

proto/buf.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
version: v1
1+
version: v2
22
breaking:
33
use:
44
- FILE

protoc-gen-prost-crate/README.md

Lines changed: 13 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -71,9 +71,9 @@ The following will just produce an include file `mod.rs` in the output `gen`
7171
directory without any conditional compilation feature flags:
7272

7373
```yaml
74-
version: v1
74+
version: v2
7575
plugins:
76-
- plugin: prost-crate
76+
- local: protoc-gen-prost-crate
7777
out: gen
7878
strategy: all
7979
opt:
@@ -84,14 +84,14 @@ When using the `gen_crate` option, later Rust generators should generate
8484
into the `src` directory which will be created by this plugin:
8585

8686
```yaml
87-
version: v1
87+
version: v2
8888
plugins:
89-
- plugin: prost
89+
- local: protoc-gen-prost
9090
out: gen/src
9191
opt:
9292
- bytes=.
9393
- file_descriptor_set
94-
- plugin: prost-crate
94+
- local: protoc-gen-prost-crate
9595
out: gen
9696
strategy: all
9797
opt:
@@ -103,14 +103,14 @@ push more files for output than desired. To limit the packages that get
103103
put into the include file, used the `only_include` option:
104104

105105
```yaml
106-
version: v1
106+
version: v2
107107
plugins:
108-
- plugin: prost
108+
- local: protoc-gen-prost
109109
out: gen/src
110110
opt:
111111
- bytes=.
112112
- file_descriptor_set
113-
- plugin: prost-crate
113+
- local: protoc-gen-prost-crate
114114
out: gen
115115
strategy: all
116116
opt:
@@ -128,9 +128,9 @@ so template information cannot be used. The plugin is referenced as follows:
128128
[1]: https://buf.build/community/neoeinstein-prost-crate
129129

130130
```yaml
131-
version: v1
131+
version: v2
132132
plugins:
133-
- plugin: buf.build/community/neoeinstein-prost-crate:v0.3.1
133+
- remote: buf.build/community/neoeinstein-prost-crate:v0.4.1
134134
out: gen
135135
```
136136

@@ -221,14 +221,14 @@ prost = "0.10.0"
221221
`buf.gen.yaml`:
222222

223223
```yaml
224-
version: v1
224+
version: v2
225225
plugins:
226-
- plugin: prost
226+
- local: protoc-gen-prost
227227
out: src
228228
opt:
229229
- bytes=.
230230
- file_descriptor_set
231-
- plugin: prost-crate
231+
- local: protoc-gen-prost-crate
232232
out: gen
233233
strategy: all
234234
opt:

protoc-gen-prost-serde/README.md

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -97,14 +97,14 @@ When used with _buf_, options can be specified in the `buf.gen.yaml` file.
9797
and `extern_path=.google.protobuf=::pbjson_types` options should be specified.
9898

9999
```yaml
100-
version: v1
100+
version: v2
101101
plugins:
102-
- plugin: prost
102+
- local: protoc-gen-prost
103103
out: gen
104104
opt:
105105
- compile_well_known_types
106106
- extern_path=.google.protobuf=::pbjson_types
107-
- plugin: prost-serde
107+
- local: protoc-gen-prost-serde
108108
out: gen
109109
```
110110
@@ -116,26 +116,26 @@ for use. The plugin is referenced as follows:
116116
[1]: https://buf.build/community/neoeinstein-prost-serde
117117

118118
```yaml
119-
version: v1
119+
version: v2
120120
plugins:
121-
- plugin: buf.build/community/neoeinstein-prost-serde:v0.2.3
121+
- remote: buf.build/community/neoeinstein-prost-serde:v0.3.1
122122
out: gen
123123
```
124124

125125
`protoc-gen-prost-serde` is also compatible with the `protoc-gen-prost-crate`
126126
plugin:
127127

128128
```yaml
129-
version: v1
129+
version: v2
130130
plugins:
131-
- plugin: prost
131+
- local: protoc-gen-prost
132132
out: gen
133133
opt:
134134
- compile_well_known_types
135135
- extern_path=.google.protobuf=::pbjson_types
136-
- plugin: prost-serde
136+
- local: protoc-gen-prost-serde
137137
out: gen
138-
- plugin: prost-crate
138+
- local: protoc-gen-prost-crate
139139
strategy: all
140140
out: gen
141141
opt:

protoc-gen-prost/README.md

Lines changed: 11 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -75,9 +75,9 @@ A note on parameter values:
7575
When used with _buf_, options can be specified in the `buf.gen.yaml` file:
7676

7777
```yaml
78-
version: v1
78+
version: v2
7979
plugins:
80-
- plugin: prost
80+
- local: protoc-gen-prost
8181
out: gen
8282
opt:
8383
- bytes=.
@@ -95,9 +95,9 @@ for use. The plugin is referenced as follows:
9595
[1]: https://buf.build/community/neoeinstein-prost
9696

9797
```yaml
98-
version: v1
98+
version: v2
9999
plugins:
100-
- plugin: buf.build/community/neoeinstein-prost:v0.2.3
100+
- remote: buf.build/community/neoeinstein-prost:v0.2.3
101101
out: gen
102102
```
103103

@@ -106,14 +106,14 @@ as a distinct step, as in the following example. For more information, see
106106
the `protoc-gen-prost-crate` plugin.
107107

108108
```yaml
109-
version: v1
109+
version: v2
110110
plugins:
111-
- plugin: prost
111+
- local: protoc-gen-prost
112112
out: gen/src
113113
opt:
114114
- bytes=.
115115
- file_descriptor_set
116-
- plugin: prost-crate
116+
- local: protoc-gen-prost-crate
117117
out: gen
118118
strategy: all
119119
opt:
@@ -140,16 +140,16 @@ Within the include file:
140140
Here is an example for _buf_ using the `protoc-gen-prost-serde` plugin:
141141

142142
```yaml
143-
version: v1
143+
version: v2
144144
plugins:
145-
- plugin: prost
145+
- local: protoc-gen-prost
146146
out: gen/src
147147
opt:
148148
- bytes=.
149149
- file_descriptor_set
150-
- plugin: prost-serde
150+
- local: protoc-gen-prost-serde
151151
out: gen/src
152-
- plugin: prost-crate
152+
- local: protoc-gen-prost-crate
153153
out: gen
154154
strategy: all
155155
opt:

protoc-gen-tonic/README.md

Lines changed: 11 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -95,15 +95,15 @@ protoc -I proto proto/greeter/v1/greeter.proto \
9595
### Usage with _buf_
9696

9797
When used with _buf_, options can be specified in the `buf.gen.yaml` file.
98-
`protoc-gen-prost-tonic` should appear as a plugin step after any
98+
`protoc-gen-tonic` should appear as a plugin step after any
9999
`protoc-gen-prost` steps.
100100

101101
```yaml
102-
version: v1
102+
version: v2
103103
plugins:
104-
- plugin: prost
104+
- local: protoc-gen-prost
105105
out: gen
106-
- plugin: tonic
106+
- local: protoc-gen-tonic
107107
out: gen
108108
```
109109
@@ -118,9 +118,9 @@ for use. The plugin is referenced as follows:
118118
[1]: https://buf.build/community/neoeinstein-tonic
119119

120120
```yaml
121-
version: v1
121+
version: v2
122122
plugins:
123-
- plugin: buf.build/community/neoeinstein-tonic:v0.3.0
123+
- remote: buf.build/community/neoeinstein-tonic:v0.4.1
124124
out: gen
125125
```
126126

@@ -130,21 +130,21 @@ Then you can depend on this crate from the binary that will host the server
130130
or use the client.
131131

132132
```yaml
133-
version: v1
133+
version: v2
134134
plugins:
135-
- plugin: prost
135+
- local: protoc-gen-prost
136136
out: gen/src
137137
opt:
138138
- compile_well_known_types
139139
- extern_path=.google.protobuf=::pbjson_types
140-
- plugin: prost-serde
140+
- local: protoc-gen-prost-serde
141141
out: gen/src
142-
- plugin: tonic
142+
- local: protoc-gen-tonic
143143
out: gen/src
144144
opt:
145145
- compile_well_known_types
146146
- extern_path=.google.protobuf=::pbjson_types
147-
- plugin: prost
147+
- local: protoc-gen-prost-crate
148148
out: gen
149149
opt:
150150
- gen_crate=Cargo.toml.tpl

0 commit comments

Comments
 (0)