bazelbuild / rules_swift

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

Update extract symbol graphs rule to include swiftdoc #1286

Closed luispadron closed 2 weeks ago

luispadron commented 2 weeks ago

This updates the symbol graph extract configurator to additionally include the .swiftdoc files created by the the Swift module compilation. This is required to produce documentation comments in the .symbolgraphs when using the symbol graph extract rule.

luispadron commented 2 weeks ago

Going to see if I can optimize this a bit before merging, we should only need the direct .swiftdoc not the transitive ones

luispadron commented 2 weeks ago

This works:

            if module.name == module_name and swift_module.swiftdoc:
                direct_swiftdocs.append(swift_module.swiftdoc)

And makes the inputs more scoped so think we should go with that