Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Deduplicate podspec declarations #439

Open
jpsim opened this issue Dec 30, 2015 · 7 comments
Open

Deduplicate podspec declarations #439

jpsim opened this issue Dec 30, 2015 · 7 comments

Comments

@jpsim
Copy link
Collaborator

jpsim commented Dec 30, 2015

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

@AliSoftware
Copy link

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`

@negebauer
Copy link

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

@istx25
Copy link
Contributor

istx25 commented Nov 23, 2016

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

@istx25 istx25 closed this as completed Nov 23, 2016
@jpsim
Copy link
Collaborator Author

jpsim commented Nov 26, 2016

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

@jpsim jpsim reopened this Nov 26, 2016
@istx25
Copy link
Contributor

istx25 commented Nov 26, 2016

Thanks for clarifying.

@gwangpa
Copy link

gwangpa commented Dec 4, 2019

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

@johnfairh
Copy link
Collaborator

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

@istx25 istx25 removed their assignment Nov 22, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

6 participants