swiftlang / swift-docc

Documentation compiler that produces rich API reference documentation and interactive tutorials for your Swift framework or package.
https://swift.org/documentation/docc
Apache License 2.0
1.17k stars 124 forks source link

Add simplified implementation of documentation input discovery #1038

Open d-ronnqvist opened 1 week ago

d-ronnqvist commented 1 week ago

Bug/issue #, if applicable: rdar://136208312

Summary

This is the second of many changes to redefine how documentation contexts are created.

This change specifically renames "documentation bundle" to "documentation inputs" and creates a new type that discovers documentation catalogs and creates documentation inputs. This is the same as LocalFileSystemDataProvider and GeneratedDataProvider except that it doesn't conform to DocumentationWorkspaceDataProvider (or any other protocol for that matter).

This new code is't used anywhere (except in the tests that verify that it behaves the same as the previous code). It's going to be a large change to switch over to this implementation, so I've deferred that to a follow up PR because people have been saying that they prefer multiple smaller PRs over one larger PR. For the same reason, this PR doesn't deprecate the old "documentation bundle" name or update existing code that references it.

Dependencies

This builds on top of the changes from #1031.

The specific changes in this PR can be seen in this diff

Testing

Nothing in particular. This is not user-facing change.

Checklist

Make sure you check off the following items. If they cannot be completed, provide a reason.

d-ronnqvist commented 1 week ago

I talked to some people about this offline and we agreed that it would be better to split the bundle renaming into a separate PR.