Skip to content

Commit acaf013

Browse files
committed
Update documentation to note that all dependencies needs to be rebuild when using prefix_output_with_package=true flag
1 parent 9b1f959 commit acaf013

File tree

1 file changed

+9
-1
lines changed

1 file changed

+9
-1
lines changed

README.md

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -116,11 +116,19 @@ can generate the Ocaml code by running
116116
| int32\_as\_int | Map \*int32 types to int instead of `int32` | `int32_as_int=false` | true |
117117
| fixed\_as\_int | Map \*fixed\* types to `int` | `fixed_as_int=true` | false |
118118
| singleton\_record | Messages with only one field will be wrapped in a record | `singleton_record=true` | false |
119-
| prefix\_output\_with\_package | Emit files prefixed with their package name. This allows multiple protofiles of the same name with different package names to be used | `prefix_output_with_package=true` | false |
119+
| prefix\_output\_with\_package | Emit files prefixed with their package name. This allows multiple protofiles of the same name with different package names to be used | `prefix_output_with_package=true`[^6] | false |
120120
| singleton\_oneof\_as\_option | Oneof declarations only containing one field are mapped to a single optional field | singleton\_oneof\_as\_option=false | true |
121121

122122
Parameters are separated by `;`
123123

124+
[^6] When using this option, all dependencies needs to be compiled
125+
using this option as well. E.g. if the protobuf file dependes on
126+
*google well known types*, you will need to rebuild using
127+
`prefix_output_with_package=true` as
128+
well. This dune file
129+
[dune](https://github.com/andersfugmann/ocaml-protoc-plugin/blob/main/test/test_params/google_types_prefixed/dune)
130+
lists how to do that.
131+
124132
If `protoc-gen-ocaml` is not located in the path, it is possible to
125133
specify the exact path to the plugin:
126134

0 commit comments

Comments
 (0)