-
In other words, I would like my generated structs to be I noticed that the swift-protobuf plugin for protoc supports a Visibility option. However, I am not sure how to configure the Any help would be greatly appreciated. Thanks. |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 5 replies
-
There isn't presently a simple way of adding options on a per-target basis, due to the way aspects work in Bazel. You can add the options on a per-plugin basis, but this would require you to make your own copy of the plugin, which is a pain. The relevant issue is #54 I'm going to add another issue so we can track this for swift. Since this is only one option, it may be viable to work around the aspect limitation since we can enumerate the values. Another option would be just to make the public visibility the default option for Swift, but that may have other implications. This is what |
Beta Was this translation helpful? Give feedback.
There isn't presently a simple way of adding options on a per-target basis, due to the way aspects work in Bazel. You can add the options on a per-plugin basis, but this would require you to make your own copy of the plugin, which is a pain. The relevant issue is #54
I'm going to add another issue so we can track this for swift. Since this is only one option, it may be viable to work around the aspect limitation since we can enumerate the values.
Another option would be just to make the public visibility the default option for Swift, but that may have other implications. This is what
rules_swift
does: https://github.com/bazelbuild/rules_swift/blob/ca8fe5b39c273d1368723ec7e88470365c173687/…