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

using jazzy when podpsec includes dependencies from a private spec repo #650

Closed
aliak00 opened this issue Sep 8, 2016 · 21 comments · Fixed by #1172
Closed

using jazzy when podpsec includes dependencies from a private spec repo #650

aliak00 opened this issue Sep 8, 2016 · 21 comments · Fixed by #1172

Comments

@aliak00
Copy link

aliak00 commented Sep 8, 2016

I'm having trouble figuring out how to tell jazzy where the pods are. Is there a config option I'm not seeing somewhere? I get this error when I run jazzy:

Using config file /Users/aliak/spt/rashomon/ios-sdk/.jazzy.yaml
Analyzing dependencies
Fetching podspec for `Rashomon` from `/Users/aliak/spt/rashomon/ios-sdk`
/Users/aliak/.rvm/gems/ruby-2.3.0/gems/cocoapods-1.0.1/lib/cocoapods/resolver.rb:442:in `handle_resolver_error': [!] Unable to find a specification for `sch-event-sdk-ios (~> 3.6.5)` depended upon by `Rashomon` (Pod::Informative)
    from /Users/aliak/.rvm/gems/ruby-2.3.0/gems/cocoapods-1.0.1/lib/cocoapods/resolver.rb:65:in `rescue in resolve'
    from /Users/aliak/.rvm/gems/ruby-2.3.0/gems/cocoapods-1.0.1/lib/cocoapods/resolver.rb:57:in `resolve'
    from /Users/aliak/.rvm/gems/ruby-2.3.0/gems/cocoapods-1.0.1/lib/cocoapods/installer/analyzer.rb:563:in `block in resolve_dependencies'
    from /Users/aliak/.rvm/gems/ruby-2.3.0/gems/cocoapods-1.0.1/lib/cocoapods/user_interface.rb:63:in `section'
    from /Users/aliak/.rvm/gems/ruby-2.3.0/gems/cocoapods-1.0.1/lib/cocoapods/installer/analyzer.rb:561:in `resolve_dependencies'
    from /Users/aliak/.rvm/gems/ruby-2.3.0/gems/cocoapods-1.0.1/lib/cocoapods/installer/analyzer.rb:76:in `analyze'
    from /Users/aliak/.rvm/gems/ruby-2.3.0/gems/cocoapods-1.0.1/lib/cocoapods/installer.rb:227:in `analyze'
    from /Users/aliak/.rvm/gems/ruby-2.3.0/gems/cocoapods-1.0.1/lib/cocoapods/installer.rb:151:in `block in resolve_dependencies'
    from /Users/aliak/.rvm/gems/ruby-2.3.0/gems/cocoapods-1.0.1/lib/cocoapods/user_interface.rb:63:in `section'
    from /Users/aliak/.rvm/gems/ruby-2.3.0/gems/cocoapods-1.0.1/lib/cocoapods/installer.rb:150:in `resolve_dependencies'
    from /Users/aliak/.rvm/gems/ruby-2.3.0/gems/cocoapods-1.0.1/lib/cocoapods/installer.rb:114:in `install!'
    from /Users/aliak/.rvm/gems/ruby-2.3.0/gems/jazzy-0.7.0/lib/jazzy/podspec_documenter.rb:18:in `block in sourcekitten_output'
    from /Users/aliak/.rvm/gems/ruby-2.3.0/gems/cocoapods-1.0.1/lib/cocoapods/config.rb:41:in `with_changes'
    from /Users/aliak/.rvm/gems/ruby-2.3.0/gems/jazzy-0.7.0/lib/jazzy/podspec_documenter.rb:15:in `sourcekitten_output'
    from /Users/aliak/.rvm/gems/ruby-2.3.0/gems/jazzy-0.7.0/lib/jazzy/doc_builder.rb:60:in `build'
    from /Users/aliak/.rvm/gems/ruby-2.3.0/gems/jazzy-0.7.0/bin/jazzy:15:in `<top (required)>'
    from /Users/aliak/.rvm/gems/ruby-2.3.0/bin/jazzy:23:in `load'
    from /Users/aliak/.rvm/gems/ruby-2.3.0/bin/jazzy:23:in `<main>'
    from /Users/aliak/.rvm/gems/ruby-2.3.0/bin/ruby_executable_hooks:15:in `eval'
    from /Users/aliak/.rvm/gems/ruby-2.3.0/bin/ruby_executable_hooks:15:in `<main>'
@Palleas
Copy link

Palleas commented Oct 31, 2016

I just ran into this exact issue. Is this something I can help with? I would only need a small nudge toward the right direction in the source code 😁

@pigeon-archive
Copy link
Contributor

Hi there @aliak00 and @Palleas. Is this something you're experiencing on the new version as well?

@aliak00
Copy link
Author

aliak00 commented Nov 24, 2016

Hey @istx25 Yeah, updated to 0.7.2 and tried again. Same thing. Cannot find private specs. Which does make sense because there's no way to tell cocoa pods (through jazzy) where the specs are located. When you run pod repo lint you can specify those private spec with the --sources option. But I haven't figured out how to set them through jazzy yet. Or maybe there's a config file for cocoa pods way, but I haven't found that either.

@pigeon-archive
Copy link
Contributor

Hi @aliak00! Thanks for double checking. I'll do some investigation and come back with what I find.

@sealz
Copy link

sealz commented Feb 23, 2017

Having the same (similar?) issue here. I've got a cocoapod that is in a private repo that has a dependency on yet another cocoapod in the same private repo. When I try and reference the podspec using the --podspec flag it complains that it cannot find the specification for the private repo dependency.

Something along the lines of the --sources flag that @aliak00 mentioned in a previous comment would work and maintain some consistency with the rest of the tooling (e.g. Cocoapods.)

@dougdoe
Copy link

dougdoe commented Feb 23, 2017

I also just found this thread and am having the same issue.

@aliak00, were you able to workaround this problem? If so, can you share your solution?

@sealz
Copy link

sealz commented Feb 23, 2017

My workaround was to not use the --podspec argument and instead use the --xcodebuild-arguments flag with the same arguments I would use to get the project to build when using xcodebuild. I'm not exactly sure what the tradeoff here is, but it seems to build and generate the documentation as expected.

My .jazzy.yaml looks like this:

---
min_acl: public
github_url: https://github.com/example/example.git
readme: docs/README.md
author: Author
clean:
output: docs/source
module: MyLibrary
xcodebuild_arguments: ["-workspace","MyLibrary.xcworkspace","-scheme","MyLibrary","-sdk","iphonesimulator"]

cc @dougdoe

@mgrebenets
Copy link
Contributor

Is the --podspec FILEPATH used purely for building or also changes the way documentation is generated?

We commit our Pods directory with the project, so running pod install is not an issue for us.

I'm still curious though if I get some cool documentation features if jazzy is able to follow the URLs to dependency pods.

@jpsim
Copy link
Collaborator

jpsim commented Apr 4, 2017

Specifying a podspec will automatically populate some of the other values (e.g. author) and it'll also generate docs for all supported platforms of the podspec, merging them together.

But it won't create links to external docs, or document modules other than the one you're documenting. We're tracking linking to external docs in #13.

@bonebox
Copy link

bonebox commented Aug 3, 2017

Has any progress been made toward a solution for private CocoaPod repos? Noticed today that this problem still exists.

@OneeMe
Copy link

OneeMe commented Sep 4, 2017

I meet the same issue, I want to use jazzy inside my company, but all the pod is private, so I can't use podspec option. @jpsim will you make some fix to this issue?

@johnfairh
Copy link
Collaborator

First thing is to check if you can avoid --podspec -- see sealz's workaround above.

@OneeMe
Copy link

OneeMe commented Sep 5, 2017

I found out that --podspec can only used for swift project, so for now I can't use this option. >.<

@suxinde2009
Copy link

@sealz dude, your apporach works good, thanks for sharing your workaround

@jgongo
Copy link

jgongo commented Oct 30, 2018

No progress two years later? 😢

@jpsim
Copy link
Collaborator

jpsim commented Nov 27, 2018

Correct, no one has built support for generating Objective-C docs for a podspec. @jgongo sounds like you might be interested in building this?

@ptraca
Copy link

ptraca commented Mar 14, 2019

Another vote for this one.

@Jon889
Copy link
Contributor

Jon889 commented Feb 28, 2020

Another vote here too :)

@EugeneNaloiko
Copy link

One more vote!

@robertofrontado
Copy link

robertofrontado commented Apr 10, 2020

Another vote! :)

@johnfairh
Copy link
Collaborator

I wrote this in one of the linked issues, to repeat it here: if someone wants to implement this then one way would be to allow the user to provide some lines in the jazzy config file for inclusion in the Podfile that gets generated internally - eg. source wherever. Can offer some tips on how to get started but you will need to be up for poking around the cocoapods Ruby api.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.