SourceDocs
SourceDocs copied to clipboard
No documentation generated when using Xcode 11
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
- Install Xcode 11,
xcode-selectto use it from the command line. - Run
sourcedocs generateon your project.- May need to pass
-- -sdk iphoneosif you get an error about Catalyst.
- May need to pass
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
cd swift/Samples/SampleAppsourcedocs generate -- -scheme Workflow -workspace SampleApp.xcworkspace -sdk iphoneos
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? :)
@zach-klippenstein Please try with the last SourceDocs 0.6.0 release
@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?
Interesting, will look into it.
Will do a Homebrew release sometime soon.
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.
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?
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)?
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?