If we tried to use build documentation on a package without a .docc file, I'll get the following error.
And after digging the swift-docc source, it turned out to be the reason swift-symbol-graph folder is empty so additional-symbol-graph is empty too. Then it will trigger throw the error.
But I remember it used not to be the case.
Suppose we have module A which is well-documented and module B which is not. And if we use "build documentation", it should give me the documentation of A. But now it just fail because B is not satisfying certain information.
Full log
CompileDocumentation (in target 'DemoKit' from project 'DemoKit')
cd /Users/kyle/Downloads/DemoKit
/Applications/Xcode-beta.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/docc convert --index --fallback-display-name DemoKit --fallback-bundle-identifier DemoKit --fallback-bundle-version 0 --output-dir /Users/kyle/Library/Developer/Xcode/DerivedData/DemoKit-crhxcnodqdoclyajfneeqrfgzqor/Build/Products/Debug/DemoKit.doccarchive --emit-fixits --additional-symbol-graph-dir /Users/kyle/Library/Developer/Xcode/DerivedData/DemoKit-crhxcnodqdoclyajfneeqrfgzqor/Build/Intermediates.noindex/DemoKit.build/Debug/DemoKit.build/swift-symbol-graph
Error: The information provided as command line arguments is not enough to generate a documentation bundle:CFBundleDisplayName : 'DemoKit'
CFBundleIdentifier : 'DemoKit'
CFBundleVersion : '0'
Additional symbol graph files: []
Command CompileDocumentation failed with a nonzero exit code
This seems to be a bug for me, I fail to "build documentation" for swift-markdown and swift-docc for the same reason.
CompileDocumentation (in target 'ArgumentParserToolInfo' from project 'swift-argument-parser')
cd /Users/kyle/Library/Developer/Xcode/DerivedData/swift-markdown-bbhqhglxpbmpqbcmkrheogehpfgp/SourcePackages/checkouts/swift-argument-parser
/Applications/Xcode-beta.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/docc convert --index --fallback-display-name ArgumentParserToolInfo --fallback-bundle-identifier ArgumentParserToolInfo --fallback-bundle-version 0 --output-dir /Users/kyle/Library/Developer/Xcode/DerivedData/swift-markdown-bbhqhglxpbmpqbcmkrheogehpfgp/Build/Products/Debug/ArgumentParserToolInfo.doccarchive --emit-fixits --additional-symbol-graph-dir /Users/kyle/Library/Developer/Xcode/DerivedData/swift-markdown-bbhqhglxpbmpqbcmkrheogehpfgp/Build/Intermediates.noindex/swift-argument-parser.build/Debug/ArgumentParserToolInfo.build/swift-symbol-graph
Error: The information provided as command line arguments is not enough to generate a documentation bundle:CFBundleDisplayName : 'ArgumentParserToolInfo'
CFBundleIdentifier : 'ArgumentParserToolInfo'
CFBundleVersion : '0'
Additional symbol graph files: []
Command CompileDocumentation failed with a nonzero exit code
Oh, It seems to be a bug on Xcode failing to create swift-symbol-graph.
Xcode 13.1 and Xcode 13.2 beta 2 is fine. Only Xcode 13.2 beta 1 has the issue for me.
Thanks for reporting this @Kyle-Ye. Since this seems to be an issue in Xcode, can you please file a feedback report with relevant details via http://feedbackassistant.apple.com/ and attach the FB number here?
It seems to be fixed on Xcode 13.2 beta 2(Which is the latest beta version of Xcode). I was wondering is there a need to post a feedback on http://feedbackassistant.apple.com/@franklin