SourceDocs icon indicating copy to clipboard operation
SourceDocs copied to clipboard

No documentation generated when using Xcode 11

Open zach-klippenstein opened this issue 6 years ago • 8 comments

Brief Description

When running sourcedocs generate with Xcode 11 tools, no source files seem to get processed and the only output is a skeleton README.md file. Using xcode-select to choose Xcode 10.3 instead, everything works as expected.

Steps to Reproduce

  1. Install Xcode 11, xcode-select to use it from the command line.
  2. Run sourcedocs generate on your project.
    • May need to pass -- -sdk iphoneos if you get an error about Catalyst.

Expected Outcome

Full set of documentation for Swift files.

Actual Outcome

A single file, README.md, with the skeleton text.

Environment

  • Operating System: macOS 10.14.6
  • Xcode Version: 11
  • SwiftDocs Version/SHA: 0.5.1
  • Swift version: 5

Demo Project

This is the project that I experienced this issue with: https://github.com/square/workflow

  1. cd swift/Samples/SampleApp
  2. sourcedocs generate -- -scheme Workflow -workspace SampleApp.xcworkspace -sdk iphoneos

zach-klippenstein avatar Oct 31 '19 18:10 zach-klippenstein

Hello, I had the same issue from the latest release, but this seems to be fixed in master. Maybe a new release is in order? :)

adesentenac avatar Oct 31 '19 22:10 adesentenac

@zach-klippenstein Please try with the last SourceDocs 0.6.0 release

eneko avatar Nov 01 '19 14:11 eneko

@eneko It works! Still need to pass in -sdk iphoneos though, without that it just generates the README still.

Thanks for fixing so quickly. Will you be publishing v0.6.0 to Homebrew eventually?

zach-klippenstein avatar Nov 01 '19 19:11 zach-klippenstein

Interesting, will look into it.

Will do a Homebrew release sometime soon.

eneko avatar Nov 02 '19 02:11 eneko

Please can we get this working with Xcode 11... ? I have tried with Xcode 10.2 and 10.3 using v0.6.1 from homebrew and I still get a skeleton README.md. I did manage to get it working with v0.6.0 but running the source.

alexandermcpherson avatar Jan 03 '20 11:01 alexandermcpherson

Hi @my-mo! Apologies, I thought this issue was fixed on the last release. Will investigate. Do you have any hint on what could be causing the issue?

eneko avatar Jan 03 '20 16:01 eneko

We also saw this issue recently. Similar to the OP, we were trying to document one module/ framework within a workspace. On some of our machines it would work as expected, but on others, we'd get a skeleton readme. On some machines we could reproduce the issue by cleaning the build folder in Xcode and deleting derived data (this would cause the skeleton readme issue). We could fix it by building the framework in Xcode (selecting the framework scheme, not one of the targets). Adding the -sdk iphoneos argument fixed the issue for us as well. Unlike the OP, we never saw any build errors about Catalyst (we're only targeting iOS), although I noticed that the framework's "deployment info" does have the Mac (requires macOS 10.15) box checked (I think this is the default when you create a new framework in Xcode 11/ 10.15)?

oliver-dew avatar May 29 '20 18:05 oliver-dew

Interesting, thank you for the feedback.

It would be great to find a few open-source Xcode projects that we can run SourceDocs against, to generate documentation. This would help finding/reproducing issues, but also serve as documentation examples for other users.

Does anyone have suggestions for open-source Xcode projects to try?

eneko avatar May 29 '20 18:05 eneko