jazzy icon indicating copy to clipboard operation
jazzy copied to clipboard

Deduplicate podspec declarations

Open jpsim opened this issue 9 years ago • 7 comments
trafficstars

When concatenating sourcekitten runs for different podspec targets, we end up with multiple versions of the same declaration: https://github.com/realm/jazzy-integration-specs/blob/jp-deprecate-swift-1/document_moya_podspec/after/execution_output.txt#L24

This causes incorrect warnings to be displayed, and makes the list of undocumented tokens explode in size due to all the duplicates: https://github.com/realm/jazzy-integration-specs/blob/jp-deprecate-swift-1/document_moya_podspec/after/docs/undocumented.txt

jpsim avatar Dec 30 '15 19:12 jpsim

jazzy seem to fail while parsing the documentation for my pod Reusable locally when telling it to use the podspec, because it seems to run xcodebuild twice and then finds duplicates for all the declarations.

I'm guessing that's the same issue as you described here? If so, don't hesitate if you need me to test stuff on my pod to help investigate.

$ jazzy --version
jazzy version: 0.5.0

$ pod --version
0.39.0

$ jazzy --podspec Reusable.podspec                                                                                                                             01:23:43 
Updating local specs repositories

CocoaPods 1.0.0.beta.2 is available.
To update use: `sudo gem install cocoapods --pre`
[!] This is a test version we'd love you to try.

For more information see http://blog.cocoapods.org
and the CHANGELOG for this version http://git.io/BaH8pQ.

Analyzing dependencies
Fetching podspec for `Reusable` from `/Users/olivier/Documents/Dev/GitHub/AliSoftware/Reusable`
Downloading dependencies
Installing Reusable (2.1.0)
Generating Pods project
Pod installation complete! There is 1 dependency from the Podfile and 1 total pod installed.
Running xcodebuild
Parsing NibLoadable.swift (1/2)
Parsing Reusable.swift (2/2)
Running xcodebuild
Parsing NibLoadable.swift (1/2)
Parsing Reusable.swift (2/2)
building site
Found conflicting type declarations with the same name, which may indicate a build issue or a bug in Jazzy: protocol NibLoadable, protocol NibLoadable
Found conflicting type declarations with the same name, which may indicate a build issue or a bug in Jazzy: static variable nib, static variable nib
Found conflicting type declarations with the same name, which may indicate a build issue or a bug in Jazzy: static method loadFromNib(), static method loadFromNib()
Found conflicting type declarations with the same name, which may indicate a build issue or a bug in Jazzy: protocol Reusable, protocol Reusable
Found conflicting type declarations with the same name, which may indicate a build issue or a bug in Jazzy: static variable reuseIdentifier, static variable reuseIdentifier
Found conflicting type declarations with the same name, which may indicate a build issue or a bug in Jazzy: protocol NibReusable, protocol NibReusable
Found conflicting type declarations with the same name, which may indicate a build issue or a bug in Jazzy: instance method registerReusableCell(_:), instance method registerReusableCell(_:)
Found conflicting type declarations with the same name, which may indicate a build issue or a bug in Jazzy: instance method registerReusableCell(_:), instance method registerReusableCell(_:)
Found conflicting type declarations with the same name, which may indicate a build issue or a bug in Jazzy: instance method dequeueReusableCell(indexPath:), instance method dequeueReusableCell(indexPath:)
Found conflicting type declarations with the same name, which may indicate a build issue or a bug in Jazzy: instance method registerReusableHeaderFooterView(_:), instance method registerReusableHeaderFooterView(_:)
Found conflicting type declarations with the same name, which may indicate a build issue or a bug in Jazzy: instance method registerReusableHeaderFooterView(_:), instance method registerReusableHeaderFooterView(_:)
Found conflicting type declarations with the same name, which may indicate a build issue or a bug in Jazzy: instance method dequeueReusableHeaderFooterView(), instance method dequeueReusableHeaderFooterView()
Found conflicting type declarations with the same name, which may indicate a build issue or a bug in Jazzy: instance method registerReusableCell(_:), instance method registerReusableCell(_:)
Found conflicting type declarations with the same name, which may indicate a build issue or a bug in Jazzy: instance method registerReusableCell(_:), instance method registerReusableCell(_:)
Found conflicting type declarations with the same name, which may indicate a build issue or a bug in Jazzy: instance method dequeueReusableCell(indexPath:), instance method dequeueReusableCell(indexPath:)
Found conflicting type declarations with the same name, which may indicate a build issue or a bug in Jazzy: instance method registerReusableSupplementaryView(_:viewType:), instance method registerReusableSupplementaryView(_:viewType:)
Found conflicting type declarations with the same name, which may indicate a build issue or a bug in Jazzy: instance method registerReusableSupplementaryView(_:viewType:), instance method registerReusableSupplementaryView(_:viewType:)
Found conflicting type declarations with the same name, which may indicate a build issue or a bug in Jazzy: instance method dequeueReusableSupplementaryView(_:indexPath:), instance method dequeueReusableSupplementaryView(_:indexPath:)
jam out ♪♫ to your fresh new docs in `docs`

AliSoftware avatar Feb 01 '16 00:02 AliSoftware

I'm having the same issue with my pod I found that this piece of the podspec triggers the run of xcodebuild multiple times

s.ios.deployment_target = '9.0'
s.osx.deployment_target = '10.11'
s.watchos.deployment_target = '2.0'
s.tvos.deployment_target = '9.0'

If I change it to this

s.ios.deployment_target = '9.0'
# s.osx.deployment_target = '10.11'
# s.watchos.deployment_target = '2.0'
# s.tvos.deployment_target = '9.0'

xcodebuild runs only one time and the warnings aren't generated

negebauer avatar Jul 14 '16 01:07 negebauer

Seems to me that this has been resolved. Closing for now. Feel free to re-open if necessary.

istx25 avatar Nov 23 '16 15:11 istx25

Nope. Jazzy will still generate duplicate symbols. That's expected, and mostly harmless other than the logged warning, but still not ideal.

jpsim avatar Nov 26 '16 04:11 jpsim

Thanks for clarifying.

istx25 avatar Nov 26 '16 05:11 istx25

Hi, any chance to resolve this issue. I'm having same issue with version 0.12.0.

gwangpa avatar Dec 04 '19 22:12 gwangpa

@gwangpa as a user you can ignore the warning; if you want to write a PR I can point you in the right direction?

johnfairh avatar Dec 05 '19 11:12 johnfairh