Skip to content

DeallocTests 4.0 (6/6): DocC documentation - #31

Open
DanielCech wants to merge 1 commit into
dc/release-4.0/5-remove-legacy-and-docsfrom
dc/release-4.0/6-docc
Open

DanielCech wants to merge 1 commit into
dc/release-4.0/5-remove-legacy-and-docsfrom
dc/release-4.0/6-docc

Conversation

@DanielCech

@DanielCech DanielCech commented Oct 28, 2026 •

Copy link
Copy Markdown
Member

Part 6 of 6. DeallocTests 4.0 series (merge in order): #25 groundwork → #26 expectDeallocation → #27 tracking, hints, DI → #28 configuration → #29 remove legacy, docs → #31 DocC.

Add DocC documentation for the 4.0 API, to be hosted on Swift Package Index.

Why

DocC is the usual way Swift packages document their API, and it shows up in Xcode's Quick Help and documentation window. Until now the README was the only documentation, so it carried the whole API, the configuration and the migration guide in one 330-line page. Nearly every public symbol already had a doc comment; what was missing was a catalog that organizes them and a place for the longer guides.

What changes

  • Sources/DeallocTests/Documentation.docc:
    • A landing page that groups the API into topics: checking an object, ordinary unit tests, configuration, STRV Dependency Injection.
    • A Lifecycle page that groups its members: any object, view controllers, SwiftUI.
    • Three articles moved from the README: Getting Started, Configuration and Grace Period, and Migrating to 4.0.
  • README: keeps the intro, requirements, installation and a quick start, and links to the articles. 329 → 140 lines.
  • .spi.yml: Swift Package Index builds the docs for the iOS variant, where .present and .push exist.
  • CI: a Documentation (iOS) job runs xcodebuild docbuild and fails on documentation warnings from this package, such as an unresolved symbol link or an undocumented parameter. The STRV Dependency Injection package has documentation warnings of its own, and the job ignores those.
  • Doc comments: the source-location parameters of both expectDeallocation overloads are documented, which was the only thing DocC warned about.
  • CHANGELOG: links "Migrating to 4.0" in the documentation.

No swift-docc-plugin dependency: SPI doesn't need it, and consumers don't have to resolve it.

After merging

The documentation links in the README and the CHANGELOG point to swiftpackageindex.com/strvcom/DeallocTests/documentation/dealloctests. They work once the package is added to Swift Package Index (a one-time submission at swiftpackageindex.com/add-a-package, which needs a tagged release). Until then they return 404.

How to review

Read the articles in Documentation.docc; most of the text is the README content, reorganized. To see the rendered docs, open the package in Xcode and choose Product › Build Documentation.

Testing

xcodebuild docbuild for iOS succeeds with no warnings from this package, and every symbol link resolves. swift build passes; the only source change is doc comments.

🤖 Generated with Claude Code

A Documentation.docc catalog with a landing page that groups the API into
topics, a Lifecycle page, and three articles moved from the README: Getting
Started, Configuration and Grace Period, and Migrating to 4.0. The README keeps
installation and a quick start and links to the articles.

.spi.yml builds the iOS variant, where the UIKit lifecycles exist. A CI job
builds the documentation and fails on warnings from this package, such as an
unresolved symbol link or an undocumented parameter.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant