[pigeon] add support for multiple swift outputs - #12720
Conversation
There was a problem hiding this comment.
Code Review
This pull request adds support for multiple output locations in the Swift generator via swiftOut and --swift_out. It updates option parsing, internal option models, and generation adapters to handle multiple paths, and adds corresponding unit tests. The review feedback suggests improving Windows compatibility by using platform-agnostic path.join instead of path.posix.join for file operations, and replacing backslashes with forward slashes before extracting file names from paths.
There was a problem hiding this comment.
LGTM, but please add a mention of this option in a readme. Probably here, as a comment above the swiftOut line in the block saying it can be an array to output to separate iOS and macOS locations if required.
| ); | ||
| final content = buffer.toString(); | ||
| sink.write(content); | ||
| for (final String outputPath in outputs.skip(1)) { |
There was a problem hiding this comment.
This could use an implementation comment; I don't think it's obvious in this context that the sink was created from the first entry in outputs.
fixes flutter/flutter#164297