Skip to content

Docs/package plugin api docs #8901

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

Open
wants to merge 5 commits into
base: main
Choose a base branch
from

Conversation

heckj
Copy link
Member

@heckj heckj commented Jul 7, 2025

Creates a documentation catalog and edits the content to provide public documentation for the Package Plugin API

resolves #8827

Motivation:

The Package Plugin API is required when creating swift package manager plugins, but doesn't have publicly hosted documentation today. This resolves that by creating the documentation catalog, adding curation (organization), and editing the documentation content to match.

Modifications:

  • creates a documentation catalog
  • provides curation (extension) DocC pages to provide organization to the module and to each of the public types in the module
  • edits to the documentation comments to align stylistically with DocC conventions.

Result:

The potential to build a documentation archive for the Package Plugin API.

Preview the contents of this PR using the command:

swift package --disable-sandbox preview-documentation --target PackagePlugin

@heckj
Copy link
Member Author

heckj commented Jul 7, 2025

@swift-ci please test

@heckj
Copy link
Member Author

heckj commented Jul 7, 2025

cc @zkiraly - I'm sure I've likely missed phrasing and editing for doc comments in DevPubs style and conventions. If you've time and inclination, I'd love a review to help point out the missed/incorrect pieces and places.

Copy link
Contributor

@bripeticca bripeticca left a comment

Choose a reason for hiding this comment

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

Just a couple of comments, going to take another pass at this just to be sure that I caught everything!

public protocol Product {
/// Unique identifier for the product.
var id: ID { get }
/// The type that represents the identifier of a packge product.
Copy link
Contributor

Choose a reason for hiding this comment

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

Suggested change
/// The type that represents the identifier of a packge product.
/// The type that represents the identifier of a package product.

/// name, though future SwiftPM versions may allow this to be customized).
/// The name of the module produced by the target.
///
/// Derived from the target name, though future SwiftPM versions may
Copy link
Contributor

Choose a reason for hiding this comment

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

Since these are API docs I'm unsure as to whether we want to keep the SwiftPM naming or if we prefer Swift package manager here.

/// The kind of module, describing whether it contains unit tests, contains
/// The kind of module.
///
/// The kind of module describes whether it contains unit tests, contains
Copy link
Contributor

Choose a reason for hiding this comment

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

Suggested change
/// The kind of module describes whether it contains unit tests, contains
/// The kind of module describes whether it contains unit tests,

I'm not beholden to this change, but what do you think? :)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Publish API documentation for PackagePlugin
2 participants