Skip to content

Remove Docc Plugin Dependency #617

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

Merged
merged 1 commit into from
Aug 22, 2022
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 0 additions & 9 deletions Package.swift
Original file line number Diff line number Diff line change
Expand Up @@ -149,12 +149,3 @@ let package = Package(
),
]
)

#if swift(>=5.6)

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Should we consider just also adding a conditional check for Windows here? Swift-DocC doesn't ship in the Windows toolchain so the plugin won't be applicable there for some time.

It might be worth leaving it around for non-Xcode users in the meantime though.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It's still unclear to me why we need a dependency on this plugin to ship docc docs outside of Xcode. To my mind, this is something SourceKit-lsp should take care of.

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It's for building and previewing documentation locally. Longer term, I agree that the plugin should probably be included in the toolchain by default (I'm not sure if sourcekit-lsp is the right place or if we should have a notion of default SwiftPM plugins) so that we have out-of-the-box support for docs. But we would need to have more discussion around that.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The plugin can be built on Windows even if the rest of DocC cannot be supported due to the dependency on NIO.

// If `SWIFTCI_USE_LOCAL_DEPS` is set, we are in a CI enviornment that might disallow
// internet access, so we can't load swift-docc-plugin. Simply don't load it in these
// environments because we don't build docc in CI at the moment.
if ProcessInfo.processInfo.environment["SWIFTCI_USE_LOCAL_DEPS"] == nil {
package.dependencies.append(.package(url: "https://github.com/apple/swift-docc-plugin", from: "1.0.0"))
}
#endif