Documentation archive build information

We are currently facing an issue in the Swift Package Index where we're generating doc archives with problematic JS due to a performance regression in swift-docc-render. The problem has been fixed but isn't available to us yet in an Xcode release.

While this is the case we keep storing potentially problematic doc archives in S3. We're lucky that we have enough information in our system to identify these problematic archives but I wanted to float the idea of adding version information to doc archives that allows inspection of participating parts of the toolchain in its creation.

This would allow us to crawl all our doc archives and identify problematic ones based on version information in the archive alone in cases where we lack that sort of information in our system.

This could be a simple versionInfo.json file as follows:

{
  "swift": "6.0.2",
  "docc": "...",
  "docc-plugin": "..."
  "docs-render": "..."
}

I'm not sure what versions exactly make sense here or what they should be called but it should essentially list versions for all the participants in documentation generation that bake output into the archive. Even if it doesn't fully capture all participants at the start, any bit of information here would help.

Would something like this be feasible?

5 Likes