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

Jazzy with .podspec fails when there is a test_spec #894

Closed
xavierLowmiller opened this issue Oct 17, 2017 · 2 comments
Closed

Jazzy with .podspec fails when there is a test_spec #894

xavierLowmiller opened this issue Oct 17, 2017 · 2 comments
Labels

Comments

@xavierLowmiller
Copy link

I'm using jazzy to document a cocoapod.

In my .jazzy.yaml, I specified the pod using podspec: <My Pod>.podspec. This used to work fine until I added a test_spec to my .podspec file:

s.test_spec 'Tests' do |test_spec|
  test_spec.source_files = 'Example/Tests/*.{swift}'
end

Now there seems to be a second xcodebuild phase that tries to build the target <My-Pod>-Tests:

/Users/<me>/.rvm/gems/ruby-2.4.2/gems/jazzy-0.8.4/lib/jazzy/executable.rb:36:in `execute_command': /Users/<me>/.rvm/gems/ruby-2.4.2/gems/jazzy-0.8.4/bin/sourcekitten ["doc", "--module-name", "<My-Pod>", "--", "-target", "<My-Pod>-Tests", "SWIFT_VERSION\\=\\\"4.0\\\""] (RuntimeError)

How can I ignore this xcodebuild phase? I don't need my tests to be documented.
Is there any documentation or best practices on how to use jazzy with a .podspec file?

@johnfairh johnfairh added the bug label Oct 17, 2017
@johnfairh
Copy link
Collaborator

test_spec was new in cocoapods 1.3 and jazzy doesn't handle it properly. It generates an Xcode unit-test target, which require special treatment to document with jazzy (#504).

I think at least for now we should disable test_specs from contributing to --podspec, this is easy enough and probably what most users want?

There aren't any docs you haven't seen: the --podspec argument runs jazzy against the spec and all subspecs for all supported platforms, and generates a default readme + metadata (eg. author) from the podspec.

@jpsim
Copy link
Collaborator

jpsim commented Oct 17, 2017

I think at least for now we should disable test_specs from contributing to --podspec, this is easy enough and probably what most users want?

👍

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

No branches or pull requests

3 participants