bazelbuild / rules_swift

Bazel rules to build Swift on Apple and Linux platforms
Apache License 2.0
309 stars 133 forks source link

Document PathToUnderscores option #1197

Closed AttilaTheFun closed 4 months ago

AttilaTheFun commented 4 months ago

In preparation for cutting rules_swift 2.0 and deleting the old proto rules, we've asked some existing consumers to migrate to the new proto rules and we're updating the documentation to include information that would have been useful during their migration.

Karim Alweheshy successfully completed the migration and reported on Slack that it was mostly a smooth transition, except he needed to add the PathToUnderscores flag because he had multiple proto files with the same name. While we do have an example which demonstrates this flag in use under //examples/xplatform/proto, the discoverability was lacking and the documentation did not discuss when you might need to use this flag. (It is documented in the SwiftProtobuf repository itself, though.)

This PR updates the proto migration documentation to describe the effects of the PathToUnderscores and how/why to use it.

Slack thread: https://bazelbuild.slack.com/archives/C04DFUBQGSU/p1713206962256899?thread_ts=1712237798.785099&cid=C04DFUBQGSU