-
Notifications
You must be signed in to change notification settings - Fork 36
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Update documentation generate script #62
base: main
Are you sure you want to change the base?
Conversation
Smart! I like this a lot – we should definitely offer this as a solution to folks who want to use the plugin for building docs but don't want to add an additional dependency. For SymbolKit specifically – I'm concerned this may break in the future since the swift-docc-plugin itself depends on SymbolKit. I'm seeing this in the build logs:
What do you think? |
Yes. I also noticed this warning locally. (Forgot to link it to the body of the PR) Can we discuss this issue with folks in SwiftPM team to offer some API to fix it? We have moduleAliases on eg. .package(name: "SymbolKit", path: "../."),
⬇️
.package(name: "SymbolKit", path: "../.", id: "SymbolKitLocal") Thus the Package.swift will update to the following let package = Package(
name: "Documentation",
dependencies: [
.package(name: "SymbolKit", path: "../.", id: "SymbolKitLocal"),
.package(url: "https://github.com/apple/swift-docc-plugin", from: "1.3.0"),
],
targets: [
.target(
name: "Empty",
dependencies: [
.product(name: "SymbolKit", package: "SymbolKitLocal"),
],
path: "Empty"
)
]
) |
70fceee
to
0ee49b6
Compare
0ee49b6
to
e388edb
Compare
Ah, since the plugin itself has a dependency on |
See swiftlang/swift-markdown#149 (comment)
Summary
Update the documentation generate script to use swift-docc-plugin.
The hand write script to call docc directly is tricky and may be out of date to enjoy the latest feature of docc. Instead we prefer to use swift-docc-plugin.
After we add SymbolKit as a dependency of swift-docc-plugin, we can't directly use swift-docc-plugin in this Package. So this PR add a new Package.swift to avoid such circle dependency issue.
Testing
Confirm the script build and work as expected.