Skip to content

Commit b570094

Browse files
committed
Update README with information about visibility errors related to swift-proto.
1 parent 2423458 commit b570094

File tree

1 file changed

+14
-0
lines changed

1 file changed

+14
-0
lines changed

README.md

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -58,6 +58,20 @@ testing with the following versions:
5858
- Swift 3.1 (swiftlang-802.0.53 clang-802.0.42)
5959
- swift-protobuf 0.9.901
6060

61+
Also, please note that recent changes to swift-proto cause generated structs
62+
to have the "internal" access level. To allow them to be used in the
63+
public interfaces generated by the grpc-swift plugin, please generate
64+
your proto structs with the following protoc options:
65+
66+
protoc <your proto files> \
67+
--swift_out=. \
68+
--swift_opt=Visibility=Public \
69+
--plugin=<path to protoc-gen-swift>`
70+
71+
More details on the `Visibility` option are [here](https://github.com/apple/swift-protobuf/blob/master/Documentation/PLUGIN.md#generation-option-visibility---visibility-of-generated-types).
72+
Due to limitations in `protoc`, the `--plugin` option must be used to
73+
specify the path to `protoc-gen-swift` whever the `--swift_opt` flag is used.
74+
6175
## License
6276

6377
grpc-swift is released under the same license as

0 commit comments

Comments
 (0)