Proposal: Improving SPIManifest, Documentation, Diagnostics, and Discoverability #3949
maximkrouk
started this conversation in
Ideas
Replies: 2 comments
-
UpdateIssue 3 seems to be addressed here #3871 |
Beta Was this translation helpful? Give feedback.
0 replies
-
Addition
|
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
The current documentation for SPIManifest is very minimal. While this keeps the surface area small, it also makes it difficult to understand best practices, trade-offs, and intended usage patterns, especially for more complex packages.
I recently added
.spi.ymlmanifests to several of my packages and found the process more frustrating than expected. Richer examples, clearer guidance, and additional elaboration on certain features would significantly improve the experience.Below are some concrete issues and suggestions
Background & Examples
For reference, here are two packages with different
.spi.ymlconfigurations:Example 1 (multiplatform docs):
capturecontext/cocoa-aliases
Example 2 (multitarget docs):
capturecontext/swift-keypaths-extensions
Issue 1: Scheme Selection Is Central but Poorly Observable
The documentation correctly explains that
builder.configsare used to guide the build system, including scheme selection:However, in practice, scheme selection is both critical and opaque.
Problems
spi-builder-workspaceis not visible.spi.ymlwithout knowing which schemes SPI actually sees, given high queue times can take a while to figure it out.Suggestions
xcodebuild -listoutput in build logsbuilder.default_schemeentry, which will be used forbuilder.configentries when custom scheme is not specifiedIssue 2:
macos-spmvsmacos-xcodebuildThe documentation distinguishes between
macos-spmandmacos-xcodebuild, which can be useful, but can also be too verbose and frustrating given that afaiu there is no mention of default behavior in docs:Problems:
macos-xcodebuildneeded whenmacos-spmis already included.Note
Writing the proposal made me reflect on SPI manifests, so for me now it looks like it's ok to specify all available platforms, (spi tries to build everything anyway), however it's required only if one needs a custom scheme or docs for specific platform
Suggestions
macosoption, that will:macos-spmandmacos-xcodebuildNote
It's currently possible to achieve this behavior by explicitly defining
macos-spmandmacos-xcodebuildplatforms (or even omitting them if a custom scheme is not needed) anddocumentation_targetswith no platform, however it would be nice to have a medium-verbose optionIssue 3: Multi-Target Documentation Has Poor Discoverability
The documentation explains that:
While technically correct, this interaction is not discoverable in practice.
In multi-target packages (e.g. swift-keypaths-extensions), secondary documentation targets are effectively hidden unless the user already knows to hover over the module name in the header.
Suggestions
Beta Was this translation helpful? Give feedback.
All reactions