swiftlang/swift-docc-plugin

Docc cannot generate the documentation folder

hamed8080 opened this issue · 6 comments

Docc plugin is not able to generate the documentation folder for the target.

Checklist

I'm using the main branch before I was using 1.0.0

Expected behavior

Generate documentation folder.

Actual behavior

It finds my docc file but when I go to the archive folder there is no documentation which is the reason why I can't see the documentation correctly. I tested it with a custom symbol graph and it works but I'm not sure this plugin support graph. But It generates some simple package that I write!

Steps to Reproduce

swift package --allow-writing-to-directory ./docs
generate-documentation
--target TARGET
--output-path ./docs
--transform-for-static-hosting
--hosting-base-path TARGET
--disable-indexing

Swift-DocC Plugin Version Information

Swift-DocC plugin version: 1.0.0 and main commit hash.
3303b16 , 6a6577a

Swift Compiler version: Output from swiftc --version.
swift-driver version: 1.62.8 Apple Swift version 5.7 (swiftlang-5.7.0.127.4 clang-1400.0.29.50)
Target: x86_64-apple-macosx12.0

Thanks for opening this @hamed8080 – do you have an example Swift package that reproduces this issue?

I can confirm this!

In https://github.com/CodeEditApp/CodeEditLanguages it does not work.

Also on https://github.com/CodeEditApp/CodeEditTextView it does no longer work. It did a couple months ago.

A workaround I found worked well is using the xcodebuild docbuild command:

xcodebuild docbuild -scheme YourScheme \
    -destination generic/platform=macos \
    OTHER_DOCC_FLAGS="--transform-for-static-hosting --hosting-base-path YourScheme --output-path ./docs"

This bug exist in 1.0.0,and the xcodebuild docbuild command worked! Thank you @lukepistrol

Hi there! Same trouble in https://github.com/AdaEngine/AdaEngine

Any help?