swiftlang / swift-docc-plugin

Swift Package Manager command plugin for Swift-DocC
https://swiftpackageindex.com/apple/swift-docc-plugin/1.3.0/documentation/swiftdoccplugin
Apache License 2.0
314 stars 54 forks source link

Docc cannot generate the documentation folder #29

Open hamed8080 opened 1 year ago

hamed8080 commented 1 year ago

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. 3303b164430d9a7055ba484c8ead67a52f7b74f6 , 6a6577adb48651a1ca7dee6861c894ee6ca66021

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

ethan-kusters commented 1 year ago

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

lukepistrol commented 1 year ago

I can confirm this!

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

lukepistrol commented 1 year ago

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

lukepistrol commented 1 year 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"
wangzhizhou commented 1 year ago

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

SpectralDragon commented 2 months ago

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

Any help?