Skip to content

Pod subspecs are built (and documented) in addition to the main spec. #981

@galli-leo

Description

@galli-leo

When one tries to run jazzy with a podspec that has multiple subspecs, jazzy will document all of them. This not only causes a lot of unnecessary compilation, but also get's jazzy confused, since a lot of symbols are defined multiple times.

Fix should be pretty simple here:

targets = installer.pod_targets
.select { |pt| pt.pod_name == podspec.root.name }
.map(&:label)

Before I am opening a pr, should this be a new config option? If yes, where would I add those? (The first time I have worked with ruby, so assistance is appreciated).

I think something like: --subspecs Subspec and only include those targets.

Also I noticed that my own podspec creates some target with a weird label:

#<Pod::PodTarget:0x00007f908dcb9e70>
Pod-b2cd66da
Pod
#<Pod::PodTarget:0x00007f908dcb9808>
Pod-SocketServer
Pod
#<Pod::PodTarget:0x00007f908dcb92b8>
Pod-Image
Pod

Above was created by adding the following code:

installer.pod_targets.map do |t|
            warn t
            warn t.label
            warn t.pod_name
end

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions